The default include path in php is “.:/usr/share/pear:/usr/share/php”(3 directories). You can change the include path by the include_path=”” option in php.ini. Note that the directories are separated by colon in Linux and semicolon in Windows. When you use include or include_once, or require/require_once for a file with relative path, php will look up the file in the include path. Of course, if you include absolute path, php won’t bother to look up the file in the include path.
You can use get_include_path to get current include path. You can use set_include_path to change the include path. What doe get_include_path do in php? Well, you may want to put your php scripts that are required by all php projects in the include path so that you need not specify the absolute directory every time you include them. Note that the include path is restricted by the open_basedir directive. You need to add the include paths to the value of open_basedir in order to access them.