0
我有一個權限問題。在我的主機上我的/ home /的public_html /圖像創建的文件夾圖片,並從的cPanel 777設置完全權限當我嘗試使用懸浮窗,它說要上傳圖片:無法在public_html/images中使用laravel和intervation寫入圖片
production.ERROR: exception 'Intervention\Image\Exception\NotWritableException' with message 'Can't write image data to path (/home/username/app_folder/public/images/15003681530.jpg)' in /home/username/app_folder/vendor/intervention/image/src/Intervention/Image/Image.php:143
爲什麼試圖寫入/ home/username/public/images文件夾?該文件夾是不是在這條道路,是在/ home /用戶名/的public_html /圖像
// create a unique name for each image
$filename = time() . $i . '.' . $image->getClientOriginalExtension();
// create a location
$location = public_path('images/').$filename;
// save the image to that location
Image::make($image->getRealPath())->resize(200,200)->save($location);
我使用laravel 5.4和干預形象的laravel。
如果我將$ location而不是public_path('images')設置爲'/ home/username/public_html/images'作品。什麼函數用於獲取公用文件夾位置? – calin24