bootstrap.php 769 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. ini_set('display_errors', 'on');
  12. ini_set('display_startup_errors', 'on');
  13. error_reporting(E_ALL);
  14. date_default_timezone_set('Asia/Shanghai');
  15. ! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
  16. ! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
  17. Swoole\Runtime::enableCoroutine(true);
  18. require BASE_PATH . '/vendor/autoload.php';
  19. Hyperf\Di\ClassLoader::init();
  20. $container = require BASE_PATH . '/config/container.php';
  21. $container->get(Hyperf\Contract\ApplicationInterface::class);