*/ /* ------------------------------------------ */ /** @todo Time zone set **/ date_default_timezone_set('Europe/Moscow'); /** Define root directory **/ defined('ROOT_PATH') or define('ROOT_PATH', dirname(__FILE__) . '/'); /** EMPTY VAR**/ $yii = ''; /** LOAD CONFIG. **/ require_once (ROOT_PATH.'protected/config/config.php'); /** remove the following lines when in production mode **/ defined('YII_DEBUG') or define('YII_DEBUG', DEBUG_MODE); if( YII_DEBUG ) { defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); ini_set('display_errors', true); error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); $yii = '../../framework/yii.php'; }else{ ini_set('display_errors', FALSE); error_reporting(FALSE); $yii = '../../framework/yiilite.php'; } /** LOAD Configure **/ $configFile = YII_DEBUG ? ROOT_PATH.'protected/config/dev.php' : ROOT_PATH.'protected/config/production.php'; /** LOAD frameforks libs and custom function **/ require_once($yii); require_once(ROOT_PATH.'protected/components/global.php'); Yii::createWebApplication($configFile)->run();