You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
749 B

5 years ago
  1. #!/usr/bin/env php
  2. <?php
  3. ini_set('display_errors', 'on');
  4. ini_set('display_startup_errors', 'on');
  5. error_reporting(E_ALL);
  6. date_default_timezone_set('Asia/Shanghai');
  7. ! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
  8. ! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
  9. require BASE_PATH . '/vendor/autoload.php';
  10. // Self-called anonymous function that creates its own scope and keep the global namespace clean.
  11. (function () {
  12. Hyperf\Di\ClassLoader::init();
  13. /** @var \Psr\Container\ContainerInterface $container */
  14. $container = require BASE_PATH . '/config/container.php';
  15. $application = $container->get(\Hyperf\Contract\ApplicationInterface::class);
  16. $application->run();
  17. })();