日期:2014-05-17 浏览次数:20507 次
function __autoload($className){ if(file_exists('model/'.$className.'.class.php')){ include_once('model/'.$className.'.class.php'); } if(file_exists('Controller/'.$className.'.class.php')){ include_once('Controller/'.$className.'.class.php'); } $prefix=$GLOBALS['groupName']=='main'?'':'../'; if(file_exists($prefix.'core/'.$className.'.class.php')){ include_once($prefix.'core/'.$className.'.class.php'); } if(file_exists($prefix.'core/Smarty-3.1.6/'.$className.'.class.php')){ include_once($prefix.'core/Smarty-3.1.6/'.$className.'.class.php'); } if(file_exists($prefix.'core/Smarty-3.1.6/sysplugins/'.$className.'.php')){ include_once($prefix.'core/Smarty-3.1.6/sysplugins/'.$className.'.php'); } }
$arr = array('classPath1','classPath2','classPath3'); foreach($arr as $v){ $new_path = $v.$className.'.php'; if(file_exists($new_path)){ include_once($new_path); break; } }