start.php 705 B

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