I have a problem when uploading the image, I used a function to resize the image, my problem is that when I upload a small size image, It's resize successfully. But with a large size image the error cannot be found. I tried the following code:
if(move_uploaded_file($file_name,$folder.$file_name) && file_exists($folder.$file_name)){
$img = new imageLib($folder.$file_name);
$img->resizeImage(360, 360, 'portrait', true);
$img->saveImage($folder.'thumb-'.$file_name, 100);
echo "Uploaded";
}
else{
echo "Error";
}
I think the problem is that the image has not yet been uploaded but has run the resize function, so the error cannot be found.
Any help much appreciated! Thanks very much!