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.
first thanks for this class... I try to rename uploaded images . It isn't usually work sometimes the image uploaded with its name and doesn't changed my code
I try to rename uploaded images . It isn't usually work sometimes the image uploaded with its name and doesn't changed my code
$new_name=0; $image_width=350; foreach($_FILES as $file) { $MyObject = new upload($file); if ($MyObject->uploaded) { $MyObject->file_new_name_body = $new_name; $MyObject->file_max_size = $max_size; $MyObject->image_convert = $imgae_type; $MyObject->image_resize = true; $MyObject->image_x = $image_width; $MyObject->image_ratio_y = true; $MyObject->process($image_dir); if ($MyObject->processed) { $MyObject->clean(); } else { echo 'error : ' . $MyObject->error; } } $new_name++; }thanks ...
before