This article mainly introduces the Path Problem in php and set_include_path. For more information, see
First: Commonly Used php path current file path: D: \ phpweb \ php_example \ include_path.php code is as follows: 1. dirname (_ FILE _); // Output D: \ phpweb \ php_example 2. $ _ SERVER ['script _ filename']; // Output D:/phpweb/php_example/include_path.php second: set_include_path in php is in php. When the file is included, when the include path is not relative or absolute (for example, include ("example. php "), the directory set by include_path will be searched first, and then searched in the current directory. This is why many documents mentioned include (". /example. php ") than include (" example. php ") Causes of high efficiency. Method: 1. ini_set ("include_path", "/usr/lib/pear"); // All Versions 2. set_include_path ("/usr/lib/pear"); // version> = 4.3.0 you can use the following method to add the directory code to the original directory: <? Php $ path = '/usr/lib/pear'; set_include_path (get_include_path (). PATH_SEPARATOR. $ path); // The include_path after setting changes to something similar to/usr/lib/function;/usr/lib/pear?>