项目移植到新的VPS后访问不了,错误信息:
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required '/var/www/project/index.php' (include_path='.:/usr/share/php') in Unknown on line 0
关键信息:failed to open stream 打不开流/文件 -- Permission denied 权限 拒绝
原因:项目文件夹总体没有读写权限,造成PHP无法解析
解决办法:
cd /var/www/project/
sudo chmod -R 0755 ./
就是统一权限为0755或者0777