我的 Laravel 項(xiàng)目中有一個(gè)圖片上傳表單。我想將上傳的圖像保存到public/images/位置。但圖像上傳到public/app/images位置。這app是從哪里來的??!配置/文件系統(tǒng).php'disks' => [ 'local' => [ 'driver' => 'local', 'root' => public_path(''),],'public' => [ 'driver' => 'local', 'root' => public_path(''), 'visibility' => 'public',],'s3' => [ 'driver' => 's3', 'key' => 'your-key', 'secret' => 'your-secret', 'region' => 'your-region', 'bucket' => 'your-bucket', ],],控制器if($this->request->hasFile('photo')) { $image_url = $this->request->photo->store('/images/campaign/large'); $image = substr($image_url, strrpos($image_url, '/') + 1);}我在本地項(xiàng)目中應(yīng)用了相同的代碼。圖片上傳到了正確的位置。但是這個(gè)問題發(fā)生在我的 cPanel 服務(wù)器項(xiàng)目中。我已經(jīng)在實(shí)時(shí)服務(wù)器中清除了現(xiàn)金。錯誤在哪里?
- 3 回答
- 0 關(guān)注
- 219 瀏覽
添加回答
舉報(bào)
0/150
提交
取消