用于类自动加载 PPPHP /** * 加载类库 * 会优先加载项目目录lib中的类 * @param str $lib 类名称 * @param str $dir like /Core/lib/ * @return obj */protected function b($lib){$systempath = CORE.'/lib/'.$lib.'.class.php';$apppath = APP.'/lib/'.$lib
用于类自动加载 PPPHP
/**
* 加载类库
* 会优先加载项目目录lib中的类
* @param str $lib 类名称
* @param str $dir like /Core/lib/
* @return obj
*/
protected function b($lib)
{
$systempath = CORE.'/lib/'.$lib.'.class.php';
$apppath = APP.'/lib/'.$lib.'.class.php';
//引入lib
if(file_exists($apppath))
{
include_once $apppath;
}
else
{
if(file_exists($systempath))
{
include_once $systempath;
}
else
{
show_error('库'.$lib.'不存在');
}
}
$lib = new $lib();
return $lib;//返回OBJ
}









