Set_include_path and require. include often uses include and require in PHP to reference other files and use relative or absolute paths. if you use the set_include_path function or ini_set ('include _ path', xxx) if the include_path configuration option is set, The require file can be referenced directly in other directories.
Set include_path configuration options
For example: require_once "class. smarttemplate. php", this file is not actually in the directory where the current file is located, but can be directly referenced in this way. Because the include_path:
// Contains the configuration file and function library path ini_set ('include _ path', INCLUDE_PATH. DS. "library". PATH_SEPARATOR. ini_get ('include _ path '));
Set_include_path function
The set_include_path function has the same effect as the ini_set ('include _ pram', xxx) function, except that the ini_set method is suitable for all PHP versions. for now, there is no difference between the two.