<?php
if(version_compare(PHP_VERSION,'5.4.0','<'))  die('require PHP > 5.4.0 !');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'prod');

require(__DIR__ . '/../protected/vendor/autoload.php');
require(__DIR__ . '/../protected/vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../protected/common/config/bootstrap.php');
require(__DIR__ . '/../protected/install/config/bootstrap.php');

$config = yii\helpers\ArrayHelper::merge(
    require(__DIR__ . '/../protected/common/config/main.php'),
    require(__DIR__ . '/../protected/common/config/db.php'),
    require(__DIR__ . '/../protected/install/config/main.php'),
    require(__DIR__ . '/../protected/install/config/main-local.php')
);
defined('ROOT_PATH') or define('ROOT_PATH', dirname(dirname(__FILE__)).'/');
defined('UPLOAD_PATH') or define('UPLOAD_PATH',ROOT_PATH.'data/upload/');
defined('RUNTIME_PATH') or define('RUNTIME_PATH',ROOT_PATH.'runtime/');
defined('COMMON_CONF_PATH') or define('COMMON_CONF_PATH', ROOT_PATH.'protected/common/config/');
defined('FRONTEND_CONF_PATH') or define('FRONTEND_CONF_PATH', ROOT_PATH.'protected/frontend/config/');
(new yii\web\Application($config))->run();
