Hello!
I again need your help, just can't understand whats going on.
Got this upload pictures form and it's having problem handling large
files (~1.5 - 2 MB).
Everything works fine if i just upload files, like this:
copy ($myfile, $uploadfolder . "/" . $myfile_name);
Everything works fine, it can process large files and everything,
but i need to make sure that people only upload pictures, so i change
it to this:
$fext = strrchr($myfile _name,".");
if($fext==".jpg " || $fext==".jpeg")
{
copy ($myfile, $uploadfolder . "/" . $myfile_name);
}
After this modification it can only process relatively small files,
around 200-300 kb, everytime i try to upload a large file it just does
not do anything,
it looks like the file is being uploaded and then nothing, the file is
not there...
I tried setting
set_time_limit( 0);
but it did not change anything...
if i check the extension it does not upload large files, if i don't -
it does...
Could someone help me please, thank you!
P.S. Whats better to use, copy or move_uploaded_f ile? Or it just does
not matter?
Thanks a lot again!
I again need your help, just can't understand whats going on.
Got this upload pictures form and it's having problem handling large
files (~1.5 - 2 MB).
Everything works fine if i just upload files, like this:
copy ($myfile, $uploadfolder . "/" . $myfile_name);
Everything works fine, it can process large files and everything,
but i need to make sure that people only upload pictures, so i change
it to this:
$fext = strrchr($myfile _name,".");
if($fext==".jpg " || $fext==".jpeg")
{
copy ($myfile, $uploadfolder . "/" . $myfile_name);
}
After this modification it can only process relatively small files,
around 200-300 kb, everytime i try to upload a large file it just does
not do anything,
it looks like the file is being uploaded and then nothing, the file is
not there...
I tried setting
set_time_limit( 0);
but it did not change anything...
if i check the extension it does not upload large files, if i don't -
it does...
Could someone help me please, thank you!
P.S. Whats better to use, copy or move_uploaded_f ile? Or it just does
not matter?
Thanks a lot again!
Comment