Blame view

environments/test/web/backend/index.php 545 Bytes
d1f8bd40   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  <?php
  
  // NOTE: Make sure this file is not accessible when deployed to production
  if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
      die('You are not allowed to access this file.');
  }
  
  $baseDirExecPath = dirname(__DIR__, 2);
  //
  defined('YII_DEBUG') or define('YII_DEBUG', true);
  defined('YII_ENV') or define('YII_ENV', 'test');
  require( $baseDirExecPath. '/vendor/autoload.php');
  require($baseDirExecPath . '/vendor/yiisoft/yii2/Yii.php');
  (new yii\web\Application(require($baseDirExecPath.'/backend/config/main.php')))->run();