Browse Source

Fix bug

master
Skylar Ittner 2 months ago
parent
commit
6e95e50830
  1. 5
      index.php

5
index.php

@ -76,6 +76,9 @@ $VARS += $urlkeyvaluepairs;
if (count($route) > 0 && strpos($route[count($route) - 1], "?") === 0) {
$morevars = explode("&", substr($route[count($route) - 1], 1));
foreach ($morevars as $var) {
if (strpos($var, "=") === false) {
continue;
}
$key = explode("=", $var, 2)[0];
$val = explode("=", $var, 2)[1];
$VARS[$key] = $val;
@ -100,7 +103,7 @@ if (!isset($APIS[$ENDPOINT])) {
exit(file_get_contents(__DIR__ . "/publicsite/$ENDPOINT.html"));
} else {
http_response_code(404);
die("404 Requested endpoint not known.");
die("404 Requested endpoint (" . htmlentities($ENDPOINT) . ") not known.");
}
}

Loading…
Cancel
Save