search

Home  >  Q&A  >  body text

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?

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:

淡淡烟草味淡淡烟草味2708 days ago981

reply all(1)I'll reply

  • phpcn_u1582

    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

    reply
    0
  • Cancelreply