PHP - Laravel The stream or file "/storage/logs/." could not be opened in append
安装完 Laravel,运行项目之后,报错:The stream or file "/usr/local/var/laravel-test/dcat/storage/logs/laravel-2021-06-15.log" could not be opened in append mode: failed to open stream: Permission denied正常安装完 Lara..
-
安装完
Laravel,运行项目之后,报错:The stream or file "/usr/local/var/laravel-test/dcat/storage/logs/laravel-2021-06-15.log" could not be opened in append mode: failed to open stream: Permission denied -
正常安装完
Laravel后,需要给这两个文件配置读写权限:storage目录和bootstrap/cache目录,我是全部一块加上。 -
操作流程
1、进入项目当前文件夹,例如
/project/test,test是项目文件夹。$ cd /project2、添加权限
$ chmod -R 777 test附:如果报错
chmod: Unable to change file mode on laravel-test/storage/framework/views/eef325e700d1864421506922200f7548a0f32fd8.php: Operation not permitted,我这里是直接删除了这种文件,一看估计就是个缓存文件,然后重新添加权限
更多推荐

所有评论(0)