date_default_timezone_set('Asia/Novosibirsk'); mb_internal_encoding('utf-8'); define('DS', DIRECTORY_SEPARATOR); $yii = '../yii/framework/yiilite.php'; if (!is_file($yii)) $yii = dirname(__FILE__).'/../yii/yiilite.php'; if(is_file(dirname(__FILE__) . DS . 'local.index.php')) { include('local.index.php'); } if (!is_file($yii)) die('Framework not found!'); defined('D_MODE_LOCAL') or define('D_MODE_LOCAL', (strpos($_SERVER['SERVER_NAME'], 'local') !== false)); if(D_MODE_LOCAL || !empty($debugMode)) defined('YII_DEBUG') or define('YII_DEBUG',true); defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); $config = dirname(__FILE__).'/protected/config/main.php'; require_once($yii); Yii::createWebApplication($config)->run(); ob_end_flush();