【发布时间】:2020-05-07 18:39:44
【问题描述】:
我在 ubuntu 18.4 上创建 Laravel 项目。
我在/var/www/html/上传我的项目,我在home/sun/download/上传图片
运行此代码后:
$imageName = "thumb_{$size}.{$extension}";
$routePath = $url . '/products/' . $product->id . '/';
Image::make($file->path())->resize($size, null, function ($constraint) {
$constraint->aspectRatio();
})->save($routePath, $imageName);
显示此错误:
"Can't write image data to path (/home/sun/download/products/2/)"
如何发出这个问题?
【问题讨论】:
标签: laravel file-permissions laravel-6 directory-permissions