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.
more info about the class
echo $handle->file_safe_name;
echo $file_safe_name;
$handle = new upload($_FILES['image_field']); if ($handle->uploaded) { $handle->file_new_name_body = $_POST['date'] . $_POST['title']; $handle->image_resize = true; $handle->image_x = 100; $handle->image_ratio_y = true; $handle->process('images/'); if ($handle->processed) { echo $_POST['date'] . $_POST['title']; echo $handle->file_safe_name; echo "OK"; $handle->clean(); } else { echo 'error : ' . $handle->error; } }
This isn't working:
And this also:
This is the original code: