碰到文件权限怪问题了
$config['image_library'] = 'GD2';$config['source_image'] = './uploads/'.$image_name;
$config['width'] = 550;
$config['height'] = 550;
$config['new_image'] = './uploads/img/'.$image_name;
$config['quality'] ='90%';
$this->load->library('image_lib',$config);
$this->image_lib->resize();
display_errors()返回:Unable to save the image. Please make sure the image and file directory are writable.
uploads/img/ 下新图片已经生成,文件权限000,uploads和img文件夹权限都已经设为777
环境应该没问题,测试了其他带GD的相册程序等,都运行正常。
环境是lnmp0.8
nginx user www www;
wwwroot目录属于www
指点一下吧,我已经彻底被搞晕了。 文件也生成了,有什么问题呢? 生成的图片文件权限属性是000啊,无法读取。
ftp上去也不能删除不能更改权限属性。 而且控制器运行到
if ( ! $this->image_lib->resize())
{
echo $this->image_lib->display_errors();//到这里它就输出错误信息了,没法运行下去
}
else
display_errors()返回:Unable to save the image. Please make sure the image and file directory are writable. 估计是图片处理类保存文件的时候没有设置文件权限吧,或者无法设置文件权限。
具体就说不好了,呵呵 图片目录的权限是什么?
页:
[1]