Beispiel #1
0
<?php

use source\core\back\BackApplication;
use source\LuLu;
use source\libs\Common;
function assist($a)
{
    echo '<pre>';
    print_r($a);
    echo '</pre>';
}
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
require __DIR__ . '/source/override.php';
require __DIR__ . '/data/config/bootstrap.php';
require __DIR__ . '/backend/config/bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(require __DIR__ . '/data/config/main.php', require __DIR__ . '/data/config/main-local.php', require __DIR__ . '/backend/config/main.php', require __DIR__ . '/backend/config/main-local.php');
Common::checkInstall($config);
$app = new BackApplication($config);
//assist($app);die;
$app->defaultRoute = '/site/index';
$app->run();
Beispiel #2
0
<?php

use source\LsYii;
use source\libs\Common;
use source\core\back\BackApplication;
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require dirname(__DIR__) . '/vendor/autoload.php';
require dirname(__DIR__) . '/vendor/yiisoft/yii2/Yii.php';
require dirname(__DIR__) . '/source/override.php';
require dirname(__DIR__) . '/common/config/bootstrap.php';
require dirname(__DIR__) . '/backend/config/bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(require dirname(__DIR__) . '/common/config/main.php', require dirname(__DIR__) . '/common/config/main-local.php', require dirname(__DIR__) . '/backend/config/main.php', require dirname(__DIR__) . '/backend/config/main-local.php');
//检测用户是否安装了程序
Common::checkInstall($config);
$application = new BackApplication($config);
Yii::setAlias('@web', '/');
Yii::setAlias('@webroot', dirname(__DIR__));
\source\core\back\BackView::setTheme();
$application->run();