// . . . // production defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); // Yii $yii=dirname(__FILE__).'/../framework/yii.php'; /** * */ if (APPLICATION_ENV == 'devel') { defined('YII_DEBUG') or define('YII_DEBUG',true); defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); } // $config = dirname(__FILE__).'/protected/config/'.APPLICATION_ENV.'.php'; require_once($yii); Yii::createWebApplication($config)->run();
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName myplace.dev DocumentRoot /home/project/dev/myplace/public # . SetEnv APPLICATION_ENV "devel" <Directory /home/project/dev/myplace/public/> AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
<?php return CMap::mergeArray( // main.php require(dirname(__FILE__).'/main.php'), array( 'components'=>array( // db 'db' => array ( // ), ), ) );
Source: https://habr.com/ru/post/146473/
All Articles