php + upload.class +不覆盖图像
我正在尝试使用 upload.class 上传文件,当用户上传新文件时我需要覆盖该文件。但他没有覆盖,而是放入了 photo_01、photo_02 等...... 代码:
$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}");
有人已经通过了这个或者有解决方案???请注意,我正在使用 file_ovewrite = true;
谢谢
,我解决了问题...抱歉耽误您的时间
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据常见问题解答,无需为同一文件实例化该类两次。您只需创建一个瞬间,然后调用进程两次。
请参阅官方常见问题解答页面 - http://www.verot.net/php_class_upload_faq.htm
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