spl_autoload_register('auto1');
spl_autoload_register('auto2');
function auto1($className){
$file = "./21".$className.".class.php";
if(file_exists($file)){
require "./21".$className.".class.php";
}
}
function auto1($className){
$file = "./22".$className.".class.php";
if(file_exists($file)){
require "./22".$className.".class.php";
}
}
自动加载类