From 068cc669809ce51220d433e26928db3dc390d13a Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 6 Nov 2013 16:10:19 +0100 Subject: [PATCH] support sub dirs --- .htaccess | 2 ++ index.js | 4 ++-- index.php | 32 +++++++++++++++----------------- 3 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..479cadf --- /dev/null +++ b/.htaccess @@ -0,0 +1,2 @@ +RewriteEngine On +RewriteRule ^ index.php diff --git a/index.js b/index.js index a6c3934..5f384ca 100644 --- a/index.js +++ b/index.js @@ -83,11 +83,11 @@ function type(s, nn) { t = s.substring(i+2); if (!is_constant(t) && !is_variable(t)) { // methods - return ""; + return ""; } } if (-1 !== (j = s.indexOf("\\")) && s.substr(j+1,1) !== "n") { - return ""; + return ""; } switch (s.toLowerCase()) { diff --git a/index.php b/index.php index 53c6529..7ae8e47 100644 --- a/index.php +++ b/index.php @@ -91,9 +91,9 @@ function urlpath($dir, $file) { function ls($dir) { $dir = rtrim(is_dir($dir) ? $dir : dirname($dir) ."/". basename($dir, ".md"), "/"); printf("