forked from ciims/CiiMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
36 lines (30 loc) · 1.32 KB
/
install.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
<?php
/**
* This is the base installer for CiiMS
* By default, this bootstraps protected/modules/install/installer.php for the initial installation
* and configuration for Yii. After that, it passes controller to Yii::createWebApplication so that
* We can run a better install (migrations, config writing, etc...)
*
* If you want to make any changes to the PRE YiiPath install, edit /protected/modules/install/installer.php
* Otherwise, this is a basic Yii App running only the install module
*/
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
error_reporting(-1);
ini_set('display_errors', 'true');
$yiiPath = __DIR__.DS.'vendor'.DS.'yiisoft'.DS.'yii'.DS.'framework'.DS.'yiilite.php';
require_once __DIR__.DS.'vendor'.DS.'autoload.php';
$config=dirname(__FILE__).'/protected/config/install.php';
$mainConfig = dirname(__FILE__).'/protected/config/main.php';
$ciimsConfig = require($config);
defined('YII_DEBUG') or define('YII_DEBUG',true);
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
defined('CIIMS_INSTALL') or define('CIIMS_INSTALL', true);
if (!file_exists($mainConfig) && !file_exists($yiiPath))
{
require(dirname(__FILE__).'/protected/modules/install/init.php');
exit();
}
require_once($yiiPath);
Yii::setPathOfAlias('vendor', __DIR__.DS.'vendor');
$app = Yii::createWebApplication($config);
$app->run();