bootstrap.php 703 B

12345678910111213141516171819202122
  1. <?php
  2. // ensure we get report on all possible php errors
  3. error_reporting(-1);
  4. define('YII_ENABLE_ERROR_HANDLER', false);
  5. define('YII_DEBUG', true);
  6. $_SERVER['SCRIPT_NAME'] = '/' . __DIR__;
  7. $_SERVER['SCRIPT_FILENAME'] = __FILE__;
  8. if (is_dir(__DIR__ . '/../vendor/')) {
  9. $vendorRoot = __DIR__ . '/../vendor'; //this extension has its own vendor folder
  10. } else {
  11. $vendorRoot = __DIR__ . '/../../..'; //this extension is part of a project vendor folder
  12. }
  13. require_once($vendorRoot . '/autoload.php');
  14. require_once($vendorRoot . '/yiisoft/yii2/Yii.php');
  15. Yii::setAlias('@yiiunit/debug', __DIR__);
  16. Yii::setAlias('@yii/debug', dirname(__DIR__) . '/src');
  17. require_once(__DIR__ . '/compatibility.php');