1. Installation environment: lnmp YII2
2. The domain name points to the entry file index.php of the project, but an error occurs when index.php introduces files in other directories. There is no problem in importing files in the current folder or files in the subfolder.
3. The project permission is 777
The screenshot is as follows:
require An error was reported when introducing the autoload file,
4. Error status code 500
The browser error is as follows:
Error details:
phpcn_u15822017-06-27 09:20:00
The problem has been solved.
The cause of the problem is: open_basedir limits the path to access files. open_basedir may be set in two places.
The solution is: modify the path of open_basedir in fastcgi.conf and modify the $document_root variable. into the project folder you wish to access