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