error_reporting(E_ALL & ~E_NOTICE); date_default_timezone_set('Europe/Moscow'); // change the following paths if necessary defined('DEV') or define('DEV', in_array($_SERVER['REMOTE_ADDR'], array('77.37.224.208','94.158.175.117'))); if(DEV) { define('YII_DEBUG', true); define('YII_TRACE_LEVEL', 3); define('YII_ENABLE_ERROR_HANDLER', true); define('YII_ENABLE_EXCEPTION_HANDLER', true); } else { defined('YII_DEBUG') or define('YII_DEBUG', false); } $yii=dirname(__FILE__).'/protected/vendors/yii/yii.php'; $domain = str_replace("www.", "", strtolower($_SERVER['HTTP_HOST'])); switch ($domain) { case '916.kosenka.ru' : { $config = dirname(__FILE__) . '/protected/config/916.kosenka.ru.php'; break; } default : { $config = dirname(__FILE__) . '/protected/config/main.php'; break; } } require_once($yii); Yii::createWebApplication($config)->run();