start.php 384 B

12345678910111213141516171819
  1. <?php
  2. $root = dirname(__DIR__);
  3. $loader = require $root.'/vendor/autoload.php';
  4. $loader->add('', $root.'/classes/');
  5. global $pixie;
  6. $pixie = new \App\Pixie();
  7. $pixie->bootstrap($root);
  8. function run(): string
  9. {
  10. global $pixie;
  11. ob_start();
  12. $pixie->handle_http_request();
  13. header(HeaderDate::$date); // To pass the bench, nginx auto add it
  14. return ob_get_clean();
  15. }