This commit is contained in:
William 2023-01-30 21:29:29 +01:00
parent a640b11b66
commit 028908053a
1 changed files with 3 additions and 7 deletions

View File

@ -12,13 +12,9 @@ abstract class Route {
array_map(strtoupper(...), explode('|', $methods))
)) return;
static $request_path_parts;
if (!isset($request_path_parts)) {
$request_path_parts = explode('/', urldecode(
strtok($_SERVER['REQUEST_URI'], '?')
)
);
}
$request_path_parts = explode('/', urldecode(
strtok($_SERVER['REQUEST_URI'], '?')
));
$path_parts = explode('/', $path);
$callback_args = [];
for ($i=0; $i < count($path_parts); $i++) {