-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.php
40 lines (33 loc) · 1.48 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* index.php file.
*
* @author Spiros Kabasakalis <[email protected]>
* @copyright Copyright © Spiros Kabasakalis 2013-
* @link InfoWebSphere,http://iws.kabasakalis.gr
* @link YiiLab,http://yiilab.kabasakalis.tk
* @link Github https://github.com/drumaddict
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @package
* @version 2.0.0
*/
defined('BACKEND') or define('BACKEND',false);
defined('LOCAL_DOMAIN') or define('LOCAL_DOMAIN','yiiapp2.dev');
define('CURRENT_ACTIVE_DOMAIN', $_SERVER['HTTP_HOST']);
defined('APP_DEPLOYED') or define('APP_DEPLOYED',!(CURRENT_ACTIVE_DOMAIN == LOCAL_DOMAIN));
defined('DS') or define('DS',DIRECTORY_SEPARATOR);
//Local Framework Path
$yii=(!APP_DEPLOYED)?dirname(__FILE__).DS.'..'.DS.'frameworks'.DS .'yii_1.1.14'.DS .'framework'.DS .'yii.php':
//Server framework Path
dirname(__FILE__).DS.'..'.DS.'frameworks'.DS .'yii_1.1.14'.DS .'framework'.DS .'yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
$shortcuts=dirname(__FILE__).DS.'protected'.DS .'helpers'.DS .'shortcuts.php';
$utils=dirname(__FILE__).DS.'protected'.DS .'helpers'.DS .'utils.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
require($shortcuts);
require($utils);
require_once($yii);
Yii::createWebApplication($config)->run();