forked from Orlac/yiiframework-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
37 lines (28 loc) · 1.09 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
<?php
// change the following paths if necessary
$yii=dirname(__FILE__).'/framework/yiilite.php';
$config=dirname(__FILE__).'/protected/config/';
// Define root directory
defined('ROOT_PATH') or define('ROOT_PATH', dirname(__FILE__) . '/');
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG', false);
if( YII_DEBUG === true ) {
ini_set('display_errors', true);
error_reporting(E_ALL);
// By default we use testing.com for the currently active domain
define('CURRENT_ACTIVE_DOMAIN', $_SERVER['HTTP_HOST']);
} else {
//ini_set('display_errors', false);
//error_reporting(0);
ini_set('display_errors', true);
error_reporting(E_ALL);
// On production it will be the yiiframework.co.il domain name
define('CURRENT_ACTIVE_DOMAIN', $_SERVER['HTTP_HOST']);
}
// Make sure runtime and assets are properly chmod
if(!is_writeable(ROOT_PATH . 'protected/runtime')) {
die('Please chmod 0777 ' . ROOT_PATH . 'protected/runtime');
}
$configFile = YII_DEBUG ? 'dev.php' : 'production.php';
require_once($yii);
Yii::createWebApplication($config . $configFile)->run();