From de9bbfdb8f0d3b366e76a5cc775690f7315c740f Mon Sep 17 00:00:00 2001 From: 53hornet Date: Fri, 10 Dec 2021 23:17:42 -0500 Subject: feat: custom routing, no required php in posts --- index.php | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 9813128..2781c7a 100644 --- a/index.php +++ b/index.php @@ -1,31 +1,10 @@ -
- -
+if (($post = strtok($_SERVER['REQUEST_URI'], '/')) && !empty($post)) { + include("./posts/$post.php"); +} else { + include('./includes/render_index.php'); +} -

- The World Wide Web pages of Adam Carpenter (53hornet) -

- - +include('./includes/foot.php'); -- cgit v1.2.3