index.php
1.24 KB
<?php
header("server: YHB-" . (getenv('APPLICATION_HOST') ? getenv('APPLICATION_HOST') : 'local'));
define('APPLICATION_PATH', dirname(__DIR__));
###########################################################################################
defined('Q_APPLICATION_ENV') || define('Q_APPLICATION_ENV', (ini_get('qin.environment') ? ini_get('qin.environment') : 'release'));
###########################################################################################
//set_include_path(implode(PATH_SEPARATOR, array(get_include_path(), ini_get('qin.path'))));
if (!empty($_GET['_qdebug']) && $_GET['_qdebug'] == 'xhprof') {
$_beginTime = microtime(true);
$shprof = new Q_Debug_Xhprof_Stat();
$shprof->setUrl('http://xhprof.debug.yohomarket.com')->start();
echo (microtime(true) - $_beginTime) . ' Start Xhprof Time.<br />';
}
require_once dirname(__FILE__).'/QF1.1/Framework/Q/Autoloader.php';
$application = new Yaf_Application(APPLICATION_PATH . "/configs/application.ini");
$application->bootstrap()->run();
if (!empty($_GET['_qdebug']) && $_GET['_qdebug'] == 'xhprof') {
echo '<br />' . (microtime(true) - $_beginTime) . ' End Run Time.<br />';
$shprof->end();
echo '<br />' . (microtime(true) - $_beginTime) . ' End Xhprof Time.<br />';
}