class time { static $start; static function start() { self::$start=self::getMicrotime(); } static function getMicrotime() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } static function getTime($length=6) { return round(self::getMicrotime()-self::$start, $length); } } time::start(); define('ROOT',dirname(__FILE__)); define('TEMPLATE',dirname(__FILE__).'/template'); if(!defined('THIS_URL')) define('THIS_URL',''); function __autoload($class) { include_once $class.'.php'; if(!class_exists($class,false)) exit('系统加载类失败,?.$class.'不存在!'); } set_include_path(ROOT.'/lib/default'.PATH_SEPARATOR.ROOT.'/lib/plugins'.PATH_SEPARATOR.ROOT.'/lib/tool'.PATH_SEPARATOR.ROOT.'/lib/table'.PATH_SEPARATOR.ROOT.'/lib/inc'); include_once 'front_class.php'; include_once 'userfunction.php'; $debug=config::get('isdebug');//1提示错误?禁止 if($debug || isset($_GET['isdebug'])){ error_reporting(E_ALL & ~E_NOTICE); }else{ error_reporting(0); } $front=new front(); $front->dispatch(); stats::getbot();