start.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Create The Application
  5. |--------------------------------------------------------------------------
  6. |
  7. | First we need to get an application instance. This creates an instance
  8. | of the application / container and bootstraps the application so it
  9. | is ready to receive HTTP / Console requests from the environment.
  10. |
  11. */
  12. global $app;
  13. $app = require __DIR__.'/bootstrap/app.php';
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Run The Application
  17. |--------------------------------------------------------------------------
  18. |
  19. | Once we have the application, we can handle the incoming request
  20. | through the kernel, and send the associated response back to
  21. | the client's browser allowing them to enjoy the creative
  22. | and wonderful application we have prepared for them.
  23. |
  24. */
  25. function run()
  26. {
  27. global $app;
  28. ob_start();
  29. $app->run();
  30. header(HeaderDate::$date); // To pass the bench, nginx auto add it
  31. return ob_get_clean();
  32. }