From 260c20d47aad928550874d92599da4a05efcbb2f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 4 Dec 2014 00:23:56 +0000 Subject: clean up index --- index.php | 56 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/index.php b/index.php index 72c7333..2c06ca3 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,5 @@ +//////////////////////////////////////////////////////////////////////////////// + +function show_404() { + // This is the template used by Nginx internally; + // if you want something else, have Nginx intercept it. + // Separation of concerns. + ?> 404 Not Found

404 Not Found

@@ -26,8 +26,18 @@ if (!is_dir($root.'/'.$dirname)) { @@ -112,6 +137,7 @@ function classify($root, $dirname, $filename) { sort($filenames); foreach ($filenames as $filename) { if ($filename === '.') { continue; } + if ($filename === '..' && is_root($root,$dirname)) { continue; } $classes = classify($root, $dirname, $filename); echo "\t\t\t\t"; if (is_link($root.'/'.$dirname.'/'.$filename)) { -- cgit v1.2.2