Commit
This commit is contained in:
parent
ecd318498f
commit
3dfee69beb
@ -12,10 +12,16 @@ abstract class Route {
|
||||
array_map(strtoupper(...), explode('|', $methods))
|
||||
)) return;
|
||||
|
||||
$callback_args = [];
|
||||
$request_path = urldecode($_SERVER['REQUEST_URI']);
|
||||
$path_parts = explode('/', $path);
|
||||
$request_path_parts = explode('/', $request_path);
|
||||
static $request_path_parts;
|
||||
if (!isset($request_path_parts)) {
|
||||
$request_path_parts = explode('/', urldecode(
|
||||
strtok($_SERVER['REQUEST_URI'], '?')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$path_parts = explode('/', $path);
|
||||
$callback_args = [];
|
||||
for ($i=0; $i < count($path_parts); $i++) {
|
||||
if (empty($path_parts[$i])) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user