日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

如果Laravel 报错 file_put_contents(): failed to open stream

發布時間:2024/9/20 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 如果Laravel 报错 file_put_contents(): failed to open stream 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

問題解決方法

  • 執行命令?php artisan cache:clear?并賦予?/storage?文件夾讀寫權限:?chmod -R 777 storage;

  • 若在執行?php artisan cache:clear?時出現錯誤:Uncaught UnexpectedValueException: The stream or file "/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87,需要賦予?/storage/log?讀寫權限:?chmod -R 777 storage/logs;

  • 此時再執行?php artisan cache:clear,若繼續出錯:[ErrorException] file_put_contents(/bootstrap/cache/services.php): failed to open stream: Permission denied,需要賦予?bootstrap/cache?讀寫權限:chmod -R 777 bootstrap/cache;

  • 再執行?php artisan cache:clear,若仍然出錯:[PDOException] SQLSTATE[HY000] [1045] Access denied for user 'xxx'@'127.0.0.1' (using password: YES),則需要查看 laravel 的數據庫配置是否正確。

  • ?

    來源:https://www.cnblogs.com/zhangzhijian/p/10789524.html

    總結

    以上是生活随笔為你收集整理的如果Laravel 报错 file_put_contents(): failed to open stream的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。