diff options
Diffstat (limited to 'pages/api.php')
-rw-r--r-- | pages/api.php | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/pages/api.php b/pages/api.php deleted file mode 100644 index 1d83985..0000000 --- a/pages/api.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -if (str_ends_with($_GET['_'], "/")) { - $pagename = substr($_GET['_'], 0, strlen($_GET['_']) - 1); -} else { - $pagename = $_GET['_']; -} - -$toplevel = explode("/", $pagename)[1]; - -if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php")) { - require_once $_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php"; -} else { - header("HTTP/1.1 500 Internal Server Error"); - echo("Endpoint not found"); - die(); -}
\ No newline at end of file |