| @@ 147-155 (lines=9) @@ | ||
| 144 | if (php_sapi_name() == 'cli-server') { |
|
| 145 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
|
| 146 | $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
| 147 | if (is_file(__DIR__ . '/' . $route)) { |
|
| 148 | if (substr($route, -4) == ".php") { |
|
| 149 | require __DIR__ . '/' . $route; // Include requested script files |
|
| 150 | exit; |
|
| 151 | } |
|
| 152 | return false; // Serve file as is |
|
| 153 | } else { // Fallback to index.php |
|
| 154 | $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
| 155 | } |
|
| 156 | } |
|
| 157 | ||
| 158 | return static::initApplication($appConfig)->run(); |
|
| @@ 203-211 (lines=9) @@ | ||
| 200 | { |
|
| 201 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
|
| 202 | $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
| 203 | if (is_file(__DIR__ . '/' . $route)) { |
|
| 204 | if (substr($route, -4) == ".php") { |
|
| 205 | require __DIR__ . '/' . $route; // Include requested script files |
|
| 206 | exit; |
|
| 207 | } |
|
| 208 | return false; // Serve file as is |
|
| 209 | } else { // Fallback to index.php |
|
| 210 | $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
| 211 | } |
|
| 212 | return true; |
|
| 213 | } |
|
| 214 | ||