编程语言
首页 > 编程语言> > php – Laravel:刀片文件中的权限被拒绝

php – Laravel:刀片文件中的权限被拒绝

作者:互联网

尝试安装Laravel(http://laravel.com/)时出现以下问题

Any help, would be greatly appreciated.

Unhandled Exception

Message:

file_put_contents(/Users/alvincrespo/Sites/apollo/storage/views/26bdebca7505781c753aa21663170a1b)
[function.file-put-contents]: failed to open stream: Permission denied
Location:

/Users/alvincrespo/Sites/apollo/laravel/blade.php on line 63 Stack
Trace:

#0 /Users/alvincrespo/Sites/apollo/laravel/laravel.php(40):
Laravel\Error::native(2, ‘file_put_conten…’, ‘/Users/alvincre…’,
63) #1 [internal function]: Laravel{closure}(2,
‘file_put_conten…’, ‘/Users/alvincre…’, 63, Array) #2
/Users/alvincrespo/Sites/apollo/laravel/blade.php(63):
file_put_contents(‘/Users/alvincre…’, ‘…’) #3 [internal
function]: Laravel{closure}(Object(Laravel\View)) #4
/Users/alvincrespo/Sites/apollo/laravel/event.php(199):
call_user_func_array(Object(Closure), Array) #5
/Users/alvincrespo/Sites/apollo/laravel/event.php(138):
Laravel\Event::fire(‘laravel.view.en…’, Array, true) #6
/Users/alvincrespo/Sites/apollo/laravel/view.php(325):
Laravel\Event::until(‘laravel.view.en…’, Array) #7
/Users/alvincrespo/Sites/apollo/laravel/view.php(546):
Laravel\View->render() #8
/Users/alvincrespo/Sites/apollo/laravel/response.php(246):
Laravel\View->__toString() #9
/Users/alvincrespo/Sites/apollo/laravel/laravel.php(138):
Laravel\Response->render() #10
/Users/alvincrespo/Sites/apollo/public/index.php(34):
require(‘/Users/alvincre…’) #11 {main}

解决方法:

我会检查权限:

/Users/alvincrespo/Sites/apollo/storage/views/26bdebca7505781c753aa21663170a1b

允许您的应用程序写入此目录.

假设您在Linux机器上,您可以运行ls -l来查看权限是什么,如果它设置为只读,请使用chmod更改权限.

标签:permission-denied,php,laravel,installation
来源: https://codeday.me/bug/20191006/1861477.html