-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.php
54 lines (40 loc) · 1.7 KB
/
common.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
date_default_timezone_set('Asia/Calcutta');
defined('YII_ENV') or define('YII_ENV','dev');
defined('YII_PAY_ENV') or define('YII_PAY_ENV','dev');
define('CACHE_TIME', 1);
//db config path setting
defined('UPLOAD_PATH') or define('UPLOAD_PATH','/wdir/uploads/');
if ( !file_exists(dirname(__FILE__). UPLOAD_PATH)) mkdir( dirname(__FILE__). UPLOAD_PATH, 0755, true);
if ( !file_exists(dirname(__FILE__). '/assets')) mkdir( dirname(__FILE__). '/assets', 0777, true);
if ( !file_exists(dirname(__FILE__). '/wdir/runtime')) mkdir( dirname(__FILE__). '/wdir/runtime', 0777, true);
defined('DB_CONFIG_PATH') or define('DB_CONFIG_PATH',dirname(__FILE__).'/config/');
defined('DB_CONFIG_FILE_PATH') or define('DB_CONFIG_FILE_PATH', DB_CONFIG_PATH.YII_ENV.'-db.php');
// change the following paths if necessary
$yii = dirname(__FILE__).'/../../framework/yii.php';
$yiic=dirname(__FILE__).'/framework/yiic.php';
$config = dirname(__FILE__).'/config/'. YII_ENV .'.php';
if ( YII_ENV == 'dev')
{
error_reporting(E_ALL);
ini_set("display_errors", 1);
// 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);
}
else if ( YII_ENV == 'test')
{
error_reporting(E_ALL);
ini_set("display_errors", 1);
// remove the following line when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
}
else
{
/* error_reporting(E_ALL);
ini_set("display_errors", 1);
// remove the following line when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true); */
$yii = dirname(__FILE__).'/../framework/yii.php';
}