From 1e2d7545617672ff5d6301c835387513ecff521e Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 11 Jan 2024 09:44:21 +0100 Subject: [PATCH] fix --- index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 5d118b8..1019000 100644 --- a/index.php +++ b/index.php @@ -14,6 +14,11 @@ $dynamic_page_dir = "dynamic/"; $subdomain = basename(explode('.', $_SERVER['HTTP_HOST'])[0]); $page_name = basename($_SERVER["QUERY_STRING"]);; +if(empty($page_name)){ + $page_name = "index"; +} + + $srvname = $_SERVER["SERVER_NAME"]; $dynamic_page_file = $page_dir . $subdomain . "/" . $page_name . ".php"; @@ -22,8 +27,6 @@ $page_file = $page_dir . $subdomain . "/" . $page_name . ".html"; $dynamic_page_file_global = $page_dir . "global/" . $page_name . ".php"; $page_file_global = $page_dir . "global/" . $page_name . ".html"; -echo $page_file; - $skeleton = file_get_contents($template_dir . "skeleton.html"); $nav = file_get_contents($template_dir . "nav.html");