forked from Adleraci/adlerka.top
		
	test
This commit is contained in:
		@@ -18,7 +18,7 @@ function getEndpoint($endpoint_name): string
 | 
			
		||||
    global $routerRequest;
 | 
			
		||||
 | 
			
		||||
    if(!$endpoint_name){
 | 
			
		||||
        $endpoint_name = $routerRequest["page_name"];
 | 
			
		||||
        $endpoint_name = $routerRequest["site_name"];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $endpoint_file = $routerConfig["endpoint_dir"] . $endpoint_name . ".php";
 | 
			
		||||
@@ -27,7 +27,7 @@ function getEndpoint($endpoint_name): string
 | 
			
		||||
        $output = runEndpoint($endpoint_file);
 | 
			
		||||
    }
 | 
			
		||||
    else{
 | 
			
		||||
        $output["error"] = "Not found";
 | 
			
		||||
        $output["Error"] = "Not found";
 | 
			
		||||
        http_response_code(404);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ function initRouter(): array
 | 
			
		||||
    $request_uri = explode("/", $_SERVER["QUERY_STRING"]);
 | 
			
		||||
 | 
			
		||||
    $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]);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user