server/src/server.php
changeset 27 a2342f26c9de
parent 1 01a844d292ac
equal deleted inserted replaced
26:72f51a9386ff 27:a2342f26c9de
     5  * @package  Laravel
     5  * @package  Laravel
     6  * @author   Taylor Otwell <taylorotwell@gmail.com>
     6  * @author   Taylor Otwell <taylorotwell@gmail.com>
     7  */
     7  */
     8 
     8 
     9 $uri = urldecode(
     9 $uri = urldecode(
    10 	parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
    10     parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
    11 );
    11 );
    12 
    12 
    13 // This file allows us to emulate Apache's "mod_rewrite" functionality from the
    13 // This file allows us to emulate Apache's "mod_rewrite" functionality from the
    14 // built-in PHP web server. This provides a convenient way to test a Laravel
    14 // built-in PHP web server. This provides a convenient way to test a Laravel
    15 // application without having installed a "real" web server software here.
    15 // application without having installed a "real" web server software here.
    16 if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri))
    16 if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
    17 {
    17     return false;
    18 	return false;
       
    19 }
    18 }
    20 
    19 
    21 require_once __DIR__.'/public/index.php';
    20 require_once __DIR__.'/public/index.php';