MAPG-47 make possible to pass GET parameters to URL

This commit is contained in:
Bence Pőcze 2020-05-25 18:52:31 +02:00
parent 41e8564872
commit 2d22d14817

View File

@ -5,6 +5,9 @@ require '../main.php';
// very basic routing
$host = $_SERVER["REQUEST_SCHEME"] . '://' . $_SERVER["SERVER_NAME"];
$url = $_SERVER['REQUEST_URI'];
if (($pos = strpos($url, '?')) !== false) {
$url = substr($url, 0, $pos);
}
switch($url) {
case '/game':
$controller = new MapGuesser\Controller\GameController();