get_include_path() include包含文件所在的所有目录 格式如下 目录;目录;目录
通过set_include_path()可以修改这些目录
PATH_SEPARATOR 分隔符 Linux(:) Windows(;)
例如
3个文件夹 "file01","file02","file03"
$include_path=get_include_path().PATH_SEPARATOR."file01/".PATH_SEPARATOR."file02/".PATH_SEPARATOR."file03/";
set_include_path($include_path);
function__autoload($className){
include strtolower($className).".class.php";
}
$class1=new Class1;
php会按顺序查找file01,file02,file03目录下是否包含 class1.class.php 这个文件 没有返回false,有则自动包含并停止查找