/** * 运行控制器 * @access public * @return void */ public static function run() { App::init(); //检查服务器是否开启了zlib拓展 if (C('GZIP_OPEN') && extension_loaded('zlib') && function_exists('ob_gzhandler')) { ob_end_clean(); ob_start('ob_gzhandler'); } //API控制器 if (APP_NAME == 'api') { App::execApi(); //Widget控制器 } elseif (APP_NAME == 'widget') { App::execWidget(); //Plugin控制器 } elseif (APP_NAME == 'plugin') { App::execPlugin(); //APP控制器 } else { App::execApp(); } //输出buffer中的内容,即压缩后的css文件 if (C('GZIP_OPEN') && extension_loaded('zlib') && function_exists('ob_gzhandler')) { ob_end_flush(); } if (C('LOG_RECORD')) { Log::save(); } return; }
/** * 运行控制器 * @access public * @return void */ public static function run() { App::init(); //API控制器 if (APP_NAME == 'api') { App::execApi(); //Widget控制器 } elseif (APP_NAME == 'widget') { App::execWidget(); //APP控制器 } else { App::execApp(); } return; }
/** * 运行控制器 */ public static function run() { App::init(); $GLOBALS['time_run_detail']['init_end'] = microtime(true); //检查服务器是否开启了zlib拓展 if (C('GZIP_OPEN') && extension_loaded('zlib') && function_exists('ob_gzhandler')) { ob_end_clean(); ob_start('ob_gzhandler'); } $GLOBALS['time_run_detail']['obstart'] = microtime(true); //API控制器 if (APP_NAME == 'api') { App::execApi(); $GLOBALS['time_run_detail']['execute_api_end'] = microtime(true); //Widget控制器 } elseif (APP_NAME == 'widget') { App::execWidget(); $GLOBALS['time_run_detail']['execute_widget_end'] = microtime(true); //Plugin控制器 } elseif (APP_NAME == 'plugin') { App::execPlugin(); $GLOBALS['time_run_detail']['execute_plugin_end'] = microtime(true); //APP控制器 } else { App::execApp(); $GLOBALS['time_run_detail']['execute_app_end'] = microtime(true); } //输出buffer中的内容,即压缩后的css文件 if (C('GZIP_OPEN') && extension_loaded('zlib') && function_exists('ob_gzhandler')) { ob_end_flush(); } $GLOBALS['time_run_detail']['obflush'] = microtime(true); if (C('LOG_RECORD')) { Log::save(); } $GLOBALS['time_run_detail']['logsave'] = microtime(true); return; }