Laravel 框架 導入excel再windows里不報錯,再nginx里報錯 No ReaderType or WriterType could be detected.


 

 

把原來代碼

$path = $request->file('file');

if (empty($path)) {
return $this->error('請選擇上傳的文件');
}

 

改成

$path1 = $this->request->file('file')->store('temp');
$path = storage_path('app').'/'.$path1;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM