test
This commit is contained in:
parent
ef11821f45
commit
28f7af8536
@ -18,8 +18,10 @@ if (!isLoggedIn()) {
|
||||
setDefaultSessionData();
|
||||
}
|
||||
|
||||
print_r($routerRequest);
|
||||
|
||||
if ($routerRequest["type"] == "api") {
|
||||
echo getEndpoint($routerRequest["page_name"]);
|
||||
echo getEndpoint($routerRequest["site_name"]);
|
||||
|
||||
} elseif ($routerRequest["type"] == "page") {
|
||||
echo getPage($routerRequest["site_name"], $routerRequest["page_name"]);
|
||||
|
@ -10,10 +10,7 @@ function initRouter(): array
|
||||
|
||||
$request_uri = explode("/", $_SERVER["QUERY_STRING"]);
|
||||
|
||||
echo $_SERVER["QUERY_STRING"];
|
||||
print_r($request_uri);
|
||||
$request_uri = array_slice($request_uri, -3, 3);
|
||||
print_r($request_uri);
|
||||
|
||||
$routerRequest["site_name"] = basename($request_uri[1]);
|
||||
$routerRequest["page_name"] = basename($request_uri[2]);
|
||||
|
Loading…
Reference in New Issue
Block a user