|
大家在使用图像处理类的图像缩小功能时有没有遇到问题?
需求:缩小1个图片,然后使用原名将其覆盖,出现如下误导性提示:Unable to save the image. Please make sure the image and file directory are writable.
查image_lib源码,让错误提示进一步显示(仍有误导性):
Message: imagepng(/opt/dir_x/images/test.png): failed to open stream: Permission denied
其实这个目录的属性已经设置为777了,上传文件功能也正常。若不覆盖原文件图片,如将目标文件名改为test2.png就能正常缩小且不报错。 |
|