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.
I cannot get the upload code to work at all. I know it is getting the right filename (without a path, maybe that is the problem?) because the name is stored in my db. Here is the attachment part of my form:
And here is how I am calling it:
$handle = new Upload($fileToUpload); if ($handle->uploaded) { // save uploaded image with no changes $handle->Process($dir_dest); error_log($handle->log); if ($handle->processed) { error_log("processed"); echo 'original image copied'; } else { error_log('error : ' . $foo->error); } $handle->Clean(); // return $dir_dest . $handle; }I get NO errors of any kind. Am I missing something in my code? Thanks