您好我在尝试使用Intervention/image保存图片时收到此错误消息
{
"error": {
"type": "Intervention\\Image\\Exception\\NotWritableException",
"message": "Can't write image data to path (/home/sourav/Public/master/v1.1.01/public/images/collections/Java/backgrdImageUrl.jpg)",
"file": "/home/sourav/Public/master/v1.1.01/vendor/intervention/image/src/Intervention/Image/Image.php",
"line": 143
}
}
以下是我的函数setBackgroundImageUrl($image)
$img = Image::make($image);
$img->save(public_path() . '/images/collections/' . $this->getCollectionTitle() . '/backgrdImageUrl.jpg');
它看起来像一个权限问题,但我尝试chmod -R 777 /images/collections
仍然会抛出相同的错误消息。