0
0

yii 928 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env php
  2. <?php
  3. /**
  4. * Yii console bootstrap file.
  5. *
  6. * @link http://www.yiiframework.com/
  7. * @copyright Copyright (c) 2008 Yii Software LLC
  8. * @license http://www.yiiframework.com/license/
  9. */
  10. defined('YII_DEBUG') or define('YII_DEBUG', true);
  11. defined('YII_ENV') or define('YII_ENV', 'dev');
  12. require(__DIR__ . '/../vendor/autoload.php');
  13. require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
  14. // 一定要包含这个文件进来,完成设置的@console的别名
  15. require(__DIR__ . '/../common/config/bootstrap.php');
  16. require __DIR__ . '/config/bootstrap.php';
  17. $config = yii\helpers\ArrayHelper::merge(
  18. require __DIR__ . '/../common/config/main.php',
  19. require __DIR__ . '/../common/config/main-local.php',
  20. require __DIR__ . '/config/main.php',
  21. require __DIR__ . '/config/main-local.php'
  22. );
  23. $application = new yii\console\Application($config);
  24. $exitCode = $application->run();
  25. exit($exitCode);