We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
composer serve
1 parent c8259e0 commit 30176d4Copy full SHA for 30176d4
composer.json
@@ -53,7 +53,7 @@
53
"post-update-cmd": [
54
"@auto-scripts"
55
],
56
- "serve": "php -S 0.0.0.0:8000 -t test/sandbox/public",
+ "serve": "php -S 0.0.0.0:8000 -t test/sandbox/public test/sandbox/public/router.php",
57
"start-selenium": "./vendor/bin/selenium-server-standalone -p 4444 -Dwebdriver.chrome.driver=./vendor/bin/chromedriver",
58
"test": "phpunit"
59
},
test/sandbox/public/router.php
@@ -0,0 +1,10 @@
1
+<?php
2
+
3
+if (false === strpos($_SERVER['REQUEST_URI'], '.')
4
+ || is_file($_SERVER['DOCUMENT_ROOT'] . '/' . $_SERVER['SCRIPT_NAME'])
5
+) {
6
+ return false;
7
+}
8
9
+$_SERVER['SCRIPT_NAME'] = '/index.php';
10
+require __DIR__ . "/index.php";
0 commit comments