0) ) { $debugMode = true; } defined('YII_DEBUG') or define('YII_DEBUG', $debugMode); defined('YII_ENV') or define('YII_ENV', $debugMode ? 'dev' : 'prod'); require(__DIR__ . '/vendor/autoload.php'); require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); require(__DIR__ . '/common/config/bootstrap.php'); $config = yii\helpers\ArrayHelper::merge( require(__DIR__ . '/common/config/main.php'), require(__DIR__ . '/frontend/config/main.php') ); if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/website-templates/amp') !== false) { $config = yii\helpers\ArrayHelper::merge( require(__DIR__ . '/common/config/main.php'), require(__DIR__ . '/frontend/config/main_amp.php') ); } if (extension_loaded('newrelic')) { newrelic_disable_autorum(); } $application = new yii\web\Application($config); include __DIR__ . DIRECTORY_SEPARATOR . 'on_before_request.php'; $application->run();