start.php 612 B

1234567891011121314151617181920212223
  1. <?php
  2. use Mall\Framework\Core\Config;
  3. use Jobs\Model\MConsole;
  4. require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Mall' . DIRECTORY_SEPARATOR . 'Bootstrap.php';
  5. // 加载项目全局变量
  6. require_once dirname(__FILE__) .DS. '.ENV.php';
  7. $configPath = __DIR__ . DS . 'Config' . DS . 'Config.php';
  8. if (!file_exists($configPath)) {
  9. exit($configPath . 'config file is not found');
  10. }
  11. Config::load($configPath);
  12. $config = Config::getInstance()->all();
  13. $console = new MConsole($config);
  14. $console->run();
  15. //【影子:报错添加】
  16. Swoole\Event::wait();