php - 从 Laravel 我无法打开流:权限被拒绝
问题描述
我使用 Laravel 5.4 并在 Web 服务器上收到如下错误
PHP致命错误:未捕获的ErrorException:file_put_contents(/github/myweb/monitor/storage/framework/views/b38c71581503e85762ce2fe49a8bis726b1164d9.php):无法打开流:权限被拒绝n /github/myweb/monitor/vendor/laravel/framework/src/ Illuminate/Filesystem/Filesystem.php:122\n堆栈跟踪:\n#0 [内部函数]:
当我在本地进行测试时,一切都很好,但是在将代码推送到服务器后,我收到了路径错误'/github/myweb/'
。我想要这样的路径
/var/www/master/monitor
如何'/github/myweb/'
从路径中删除前缀我不知道它来自哪里
怎么了?
解决方案
首先清除缓存,
php artisan config:clear
php artisan config:cache
然后运行sudo chmod -R 755 storage/
或者,您可以删除 bootstrap/cache/config.php
推荐阅读
- javascript - React fetch 给出错误 415(不支持的媒体类型)
- javascript - 有没有办法在javascript中构建一种动态数组?
- mysql - 启动 WAMP 服务器以启动 MySQL 服务器
- openedge - 每小时生产数据(Progress 4gl)
- html - 如何在 Chrome 的新标签中下载锚标签?
- docker - 如何在代理后面的 vagrant 托管机器上正确安装 docker
- c# - 什么是 pdf 文件的 base64 字符串的正则表达式?
- oracle - 尝试插入行并回滚到最后一个有效条目
- python - 在 pycharm 中共享相同的远程 docker
- javascript - Expo Google 登录 DEVELOPER_ERROR