From c28756c6fa994a0e87397ac16445bd6d0ea9ec02 Mon Sep 17 00:00:00 2001 From: Strangedusk Date: Thu, 27 Jan 2022 16:31:53 +0100 Subject: [PATCH] Navigation --- include/utils.php | 27 +++++++++++++++++++++++++++ index.php | 40 +++++++++++++++++++++++++++------------- 2 files changed, 54 insertions(+), 13 deletions(-) create mode 100644 include/utils.php diff --git a/include/utils.php b/include/utils.php new file mode 100644 index 0000000..8b685a5 --- /dev/null +++ b/include/utils.php @@ -0,0 +1,27 @@ + - -

Magatzem de Dusk

-File not found, error 404'; $basedir = 'content'; $request_uri = $_SERVER['REQUEST_URI']; $path = $basedir . $request_uri; +/**/ +// Check if URI is correct if(!is_dir($path)) { echo($not_found_error); die(); @@ -62,6 +56,14 @@ if(!is_dir($path)) { $files_in_folder = scandir($path); $resource_array = filter_files_dir($files_in_folder, $path); +/* Debug */ +/* var_dump($_SERVER); + * var_dump($files_in_folder); */ + +?> + +

Magatzem de Dusk

+ + + +NAV; ?>