Getimagesize()-读取错误 [英] Getimagesize() - read error
问题描述
因此,我正在对其他人的旧代码进行维护,并修复了一些基本权限问题,但是现在在图像上传器中,出现以下错误:
So I'm doing some maintenance on other people's legacy code, and I've fixed some basic permissions issues, however now in an image uploader, I'm getting the following error:
Warning: getimagesize() [function.getimagesize]: Read error! in /home/kirby/public_html/members/upload_advanced.php on line 211
现在,该目录的权限已设置为允许读取,执行和写入-什么会导致该问题?可能是上传者没有正确编写信息吗?
Now, the permissions for that directory are set to allow read, execution and write - what would cause that issue? Could it be that the uploader isn't correctly writing the information?
推荐答案
我以前见过,对我来说这是一个内存问题,方法失败:
I've seen this before, and for me it was a memory issue, failing in the method:
_getNeedMemoryForFile
最安全的选择也许是包装并尝试捕获并尽可能优雅地处理异常.
Probably the safest bet is to wrap to try-catch and handle the exception as gracefully as possible.
这篇关于Getimagesize()-读取错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!