我正在改进我的PHP文件上传脚本中的错误处理,并试图找出如何正确处理UPLOAD_ERR_PARTIAL。
应该提示用户再次尝试上传文件,还是应该通知他们是否存在更严重的问题,阻止他们上传可能的合法文件?解决方案
为什么文件只能上传?
这通常是由用户取消上传引起的。
我应该提示用户尝试再次上传文件,或者我应该通知他们,有一个更多的严重的问题,这是阻止他们上传一个可能的合法文件?
您应该提示他们再次尝试,如果问题仍然与网站所有者联系,包括尽可能详细的细节。
Why might a file only be partially uploaded?
I am improving error-handling in my PHP file upload script and am trying to figure out how to handle UPLOAD_ERR_PARTIAL properly.
Should I prompt the user to try uploading the file again, or should I inform them that there is a more severe problem which is preventing them from uploading a possibly legitimate file?
解决方案Why might a file only be partially uploaded?
This is usually caused by the user canceling the upload.
Should I prompt the user to try uploading the file again, or should I inform them that there is a more severe problem which is preventing them from uploading a possibly legitimate file?
You should prompt them to try again and if problems continue to contact the site owners, including as much detail as possible.
更多推荐
为什么文件只能部分上传?
发布评论