This article mainly introduces the path problem and Set_include_path in PHP, need friends can refer to the following
first:php Common Path Current file path: d:phpwebphp_exampleinclude_path.php code as follows: 1.dirname (__file__); Output d:phpwebphp_example 2.$_server[' script_filename ']; Output d:/phpweb/php_example/include_path.php second:php Set_include_path in PHP, include files when the include path is not relative or absolute (for example: inclu De ("example.php"), finds the directory set by Include_path, and then looks in the current directory, which is why a lot of information mentions include ("./example.php") than include (" example.php ") The reason for the high efficiency. Methods: 1.ini_set ("Include_path", "/usr/lib/pear"); All versions 2.set_include_path ("/usr/lib/pear"); VERSION>=4.3.0 can use the following method to add the directory code to the original directory as follows: <?php $path = '/usr/lib/pear '; Set_include_path (Get_include_path (). Path_separator. $path);//set Include_path to resemble/usr/lib/function;/usr/lib/pear?>