1. The meaning of include_path
When the functions include(), require(), and fopen_with_path() are used to find files. When include_path is not set, these functions will default to the web root when opening files. Directory to search. When include_path is set, these php functions will first search under the specified include_path directory.
The principle is similar to the environment variables of the window system. When the window runs the cmd command, enter After some cmd commands are executed, the system will search whether these commands exist in the environment variables set by it, and they can be executed if they exist.
2.include_path settings
The first method:
Modify the include_path item in the php.ini file.
include_path = .:/usr/local/lib/php:./include
Second method:
Use the ini_set method.
ini_set("include_path", ".:../:./include:../include");
3. Note
zendframework include setting index.php