if ( ! function_exists('is_loaded'))
{
function &is_loaded($class = '')
{
static $_is_loaded = array();
if ($class != '')
{
$_is_loaded[strtolower($class)] = $class;
}
return $_is_loaded;
}
}
注:数组用static修饰,为静态变量,只初始化一次,且程序执行离开此作用域时,变量值不消失,会保留上次执行结果。