Skip to content

Commit 34d2e6a

Browse files
committed
Finished support for web server
1 parent fd3abd2 commit 34d2e6a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

resources/web/app_test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
use Symfony\Component\HttpFoundation\Request;
54

65
$kernel = include __DIR__.'/../../bootstrap/kernel_bootstrap.php';

resources/web/router.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
<?php
22

3+
$req = $_SERVER['REQUEST_URI'];
4+
5+
// If this looks like a file request then return
6+
// false and serve the file
7+
if (preg_match('^\.[A-Za-z]{3,4}$^', $req)) {
8+
return false;
9+
}
10+
11+
// otherwise lets run the application
312
$_SERVER['DOCUMENT_ROOT'] = __DIR__;
413
$_SERVER['SCRIPT_FILENAME'] = __DIR__.DIRECTORY_SEPARATOR.'app_test.php';
514

615
require 'app_test.php';
7-

0 commit comments

Comments
 (0)