php file_put_content...无法打开流:Laravel 5 中的权限被拒绝
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31099001/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
file_put_content...fail to open stream:Permission denied in Laravel 5
提问by Pawan Dongol
The error is mention in below:-
错误在下面提到:-
ErrorException in Filesystem.php line 81:
file_put_contents(/var/www/html/Training-management-system/storage/framework/views/bcb68ba8b65b7fabca5fe88709fb00b6): failed to open stream: Permission denied
I can google itbut not get the exact solution. SO I am thankful if anyone help me to solve it out.
我可以谷歌它但没有得到确切的解决方案。所以我很感激如果有人帮我解决它。
回答by Joaquin Javi
is a file permissions issue as lesssugar said , you need to give writte permissions to the storage folder , so go to your html/Tranining-management-system.. folder an then you can do :
正如lesssugar所说,是文件权限问题,您需要为存储文件夹授予写入权限,因此请转到您的html/Training-management-system ..文件夹,然后您可以执行以下操作:
chmod -R 0777 storage/
That will change to writte access Recursively .
这将更改为递归写入访问。
Please read the configuration section in docs :
请阅读文档中的配置部分:
http://laravel.com/docs/master#configuration
http://laravel.com/docs/master#configuration
You have to do the same with the cache folder.
您必须对缓存文件夹执行相同操作。
回答by Gufran Hasan
I tried many solutions but didn't get resolved this error.
我尝试了很多解决方案,但没有解决这个错误。
Just:
I have just created views folderin 'storage/framework'
and solved it.
Just:
我刚刚创建视图文件夹中'storage/framework'
,并解决它。