server.php 487 B

12345678910111213141516171819
  1. <?php
  2. $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
  3. $uri = urldecode($uri);
  4. $public = __DIR__ . '/public';
  5. $requested = $public . $uri;
  6. // This file allows us to emulate Apache's "mod_rewrite" functionality from the
  7. // built-in PHP web server. This provides a convenient way to test a Laravel
  8. // application without having installed a "real" web server software here.
  9. if ($uri !== '/' and file_exists($requested))
  10. {
  11. return false;
  12. }
  13. require_once $public . '/index.php';