php - lnmp has installed YII2. The domain name points to the entry file of the YII project folder. Files in this folder and subfolders can be imported, but files in other directories cannot be imported. Why?
淡淡烟草味
淡淡烟草味 2017-06-27 09:18:00
0
1
1036

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:

淡淡烟草味
淡淡烟草味

reply all(1)
phpcn_u1582

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template