Пример #1
0
<?php

/**
 * 系统启动程序入口
 *
 * @package Imp
 * @author 		Imp <*****@*****.**>
 * @copyright 	2015-2016 Imp All rights reserved.
 * @version 	1.0
 * @link
 */
!defined(APP_PATH) or die('undefine APP_PATH');
!defined(IMP_PATH) or die('undefine IMP_PATH');
!defined(ROOT_PATH) or die('undefine ROOT_PATH');
// 系统跟踪信息
$GLOBALS['_TRACE']['beginTime'] = microtime(true);
ob_start();
require __DIR__ . DIRECTORY_SEPARATOR . '../Imp.php';
// 添加时间跟踪器
//Tracer::time('start');
// 应用配置
$config = (require APP_PATH . 'Configs/Config.php');
// 创建应用
$app = Imp::createWebApplication($config, dirbane(__DIR__));
// 添加时间跟踪器
Tracer::time('end_create_app');
return $app;
// 注册自动装载方法
// spl_autoload_register(array('Imp', 'autoload'));