0

嗨,我在尝试使用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过它仍然会抛出相同的错误消息。

4

0 回答 0