i am trying to upload a file with upload.class and i need to overwrite the file when the user upload a new one. But instead of overwriting, he is putting photo_01, photo_02, etc... The code:
$foto = new Upload($_FILES['photo']);
$fotot = new Upload($_FILES['photo']);
$fotot->image_resize = true;
$fotot->image_y = 110;
$fotot->image_x = 110;
$foto->file_new_name_body = "photo";
$fotot->file_new_name_body = "photo";
$foto->file_overwrite = true;
$fotot->file_overwrite = true;
$fotot->Process("{$dir_fotos}thumbs/");
$foto->Process("{$dir_fotos}");
Somebody has already passed by this or has a solution??? notice that i'm using file_ovewrite = true;
thanks
I solved the problem...sorry spending your time
As per the faq, there is no need to instantiate the class twice for same file. U just create one instant and then call process twice. refer official faq page - http://www.verot.net/php_class_upload_faq.htm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.