index-test.php 469 B

1234567891011121314151617
  1. <?php
  2. if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
  3. die('You are not allowed to access this file.');
  4. }
  5. defined('YII_DEBUG') or define('YII_DEBUG', true);
  6. defined('YII_ENV') or define('YII_ENV', 'test');
  7. require_once(__DIR__ . '/../vendor/autoload.php');
  8. require_once(__DIR__ . '/../vendor/yiisoft/yii2/yii/Yii.php');
  9. $config = require(__DIR__ . '/../config/web-test.php');
  10. $application = new yii\web\Application($config);
  11. $application->run();