hyperf.php 634 B

123456789101112131415161718192021
  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. require BASE_PATH . '/vendor/autoload.php';
  9. // Self-called anonymous function that creates its own scope and keep the global namespace clean.
  10. (function () {
  11. /** @var \Psr\Container\ContainerInterface $container */
  12. $container = require BASE_PATH . '/config/container.php';
  13. $application = $container->get(\Hyperf\Contract\ApplicationInterface::class);
  14. $application->run();
  15. })();