class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Sometimes it goes through properly and other times it stops. It has worked for a jpg and a gif, and then I try to send a different jpg and it gets stopped.
I know it is the line of code that calls the process method because I put an echo before and after and it only said the first one.
I looked in the php error log and it didn't even throw an error there. So now I am lost as to what is happening.Reply
This is the code that I am using...
$handle = new upload($_FILES['shirt_front']); if ($handle->uploaded) { $handle->file_new_name_body = $name; $handle->image_x = 720; $handle->image_y = 720; $handle->image_resize = true; $handle->allowed = array('image/*'); $handle->image_convert = 'jpg'; $handle->file_max_size = 1024 * 300; $handle->process(DIR_WS_IMAGES . 'shirtPix/'); if ($handle->processed) { $handle->clean(); return 'success'; } else { return $handle->error; } }Sometimes it goes through properly and other times it stops. It has worked for a jpg and a gif, and then I try to send a different jpg and it gets stopped.I know it is the line of code that calls the process method because I put an echo before and after and it only said the first one.
I looked in the php error log and it didn't even throw an error there. So now I am lost as to what is happening.