bootstrap.php
1.31 KB
<?php
/**
* My new Zend Framework project
*
* @author
* @version
*/
#系统必须设置
defined('Q_WWW_PATH') or define("Q_WWW_PATH", dirname(dirname(__FILE__)));
date_default_timezone_set('Asia/Shanghai');
set_include_path('.' . PATH_SEPARATOR . '../library' . PATH_SEPARATOR . '/Data/code/QFramework2.0' . PATH_SEPARATOR . '/Data/code/bright.knight' . PATH_SEPARATOR . '/Data/code/dark.knight'. PATH_SEPARATOR . '/Data/code/QCbb');
require_once 'Q/__config.php';
require_once 'Zend/Loader/Autoloader.php';
require_once 'Initializer.php';
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);
// Prepare the front controller.
$frontController = Zend_Controller_Front::getInstance();
$frontController->registerPlugin(new QLib_Plugin_Debug(), 9999999);
$frontController->registerPlugin(new QLib_Plugin_Xss(), 9999998);
$frontController->registerPlugin(new QLib_Plugin_Layout());
$q_application_env = (getenv('Q_APPLICATION_ENV') ? getenv('Q_APPLICATION_ENV') : 'rls');
if(!defined('Q_APPLICATION_ENV')){
define('Q_APPLICATION_ENV', $q_application_env);
}
$frontController->registerPlugin(new Initializer($q_application_env)); //local, server, dedicated, release
//$stat = new Q_Debug_Xhprof_Stat( 'http://192.168.10.219/xhprof-0.9.2/xhprof_html/' );
//$stat->start();
$frontController->dispatch();
//$stat->end();