-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
27 lines (20 loc) · 951 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
require_once 'Microsoft/Autoloader.php';
// set environment
require_once(dirname(__FILE__) . '/protected/extensions/yii-environment/Environment.php');
$env = new Environment('LOCAL');
//$env = new Environment('PRODUCTION'); //override mode
// change the following paths if necessary
//$yii=dirname(__FILE__).'/../framework/yii.php';
//$config=dirname(__FILE__).'/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',$env->yiiDebug);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',$env->yiiTraceLevel);
//require_once($yii);
//Yii::createWebApplication($config)->run();
// run Yii app
//$env->showDebug(); // show produced environment configuration
require_once($env->yiiPath);
$env->runYiiStatics(); // like Yii::setPathOfAlias()
Yii::createWebApplication($env->configWeb)->run();