0
我正在使用laravel 5.2,並在處理圖像上傳時遇到問題。我得到一個錯誤,因爲Image.php中的NotWritableException行143:無法將圖像數據寫入路徑(C: Users SurajLifeean surj public images /)
NotWritableException in Image.php line 143: Can't write image data to path (C:\Users\SurajLifeean\surj\public\images/)
這段代碼在我的控制器裏面。
$image=$request->file('featured_image');
$filename=time().'.'.$image->getClientOriginalExtension();
$location = public_path('images/',$filename);
Image::make($image)->resize(800,400)->save($location);$post->image=$filename;
我有翻過的解決方案在開始時
use Illuminate\Support\Facades\File;
,包括但它沒有幫助。 任何一個可以建議我從你的錯誤信息的解決方案
我照建議,但問題仍然存在。 –
Image.php中的NotWritableException行143: 無法將圖像數據寫入路徑(C:\ Users \ SurajLifeean \ surj \ public \ images \) –
@SurajJeswara查看我的更新 – hassan