briedis Posted May 3, 2011 Report Share Posted May 3, 2011 Izlasi vēlreiz šo nosacījumu :) Quote Link to comment Share on other sites More sharing options...
kapec gan ne Posted May 3, 2011 Report Share Posted May 3, 2011 (edited) audio/mp3 nomainīju uz audio/mpeg if($type == "audio/mp3" || $size >167772160) { die("this format is not allowed or file is to big"); } $type == "audio/mp3" - t.i ja fails ir mp3 audio, tad die vai fails > 167772160, tad die ) audio/mp3 manuprat bija pareizs!? P.S ja augsuplade mp3 failu bez faila tipa .mp3 beigas caur type radis, ka tas audio fails?) Edited May 3, 2011 by kapec gan ne Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 4, 2011 Report Share Posted May 4, 2011 Ir pagaidām tā... ja ir mp3 fails un / vai tas atbilst noteiktajam lielumam (citiem vārdiem sakot, ja viss ir kārtībā), tad beidzam skriptu un izmetam kļūdas paziņojumu! RTFM! Quote Link to comment Share on other sites More sharing options...
briedis Posted May 4, 2011 Report Share Posted May 4, 2011 Ir pagaidām tā... ja ir mp3 fails un / vai tas atbilst noteiktajam lielumam (citiem vārdiem sakot, ja viss ir kārtībā), tad beidzam skriptu un izmetam kļūdas paziņojumu! RTFM! Neatbilst. if($type == "audio/mp3" || $size >167772160) { die("this format is not allowed or file is to big"); } Tulkotos kā JA(tips ir autdio/mp3 VAI faila izmŗes ir lielāks par 167772160 baitiem) TAD beidzam skripta izpildi un izmetam paziņojumju "this format is not allowed or file is to big" Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 4, 2011 Report Share Posted May 4, 2011 Nu jā... Tādā gadījumā == vietā ieliec !==. Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted May 5, 2011 Author Report Share Posted May 5, 2011 uzliekot uz hosta servera viss straadaa, bet localhost (wamp 2) neiet! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.