# HG changeset patch # User edogawaconan # Date 1413895309 -32400 # Node ID b84ce3ef4c9d37cc544236e55c7707168468dc5a # Parent 7812af1c23ae90fd3247d3bf7d59f11f9bf158f8 Fix behaviour difference between version. diff -r 7812af1c23ae -r b84ce3ef4c9d index.php --- a/index.php Tue Oct 21 21:31:38 2014 +0900 +++ b/index.php Tue Oct 21 21:41:49 2014 +0900 @@ -11,13 +11,14 @@ $path = urldecode($path); $prefix = $_SERVER["DL_PREFIX"]; + if ($prefix === null) { $prefix = ""; } - $path = substr($path, strlen(utf8_decode($prefix))); + $path = substr($path, strlen($prefix)); if ($path === false) { $path = "/"; } // root of directory listing. $root = $_SERVER["DL_ROOT"]; - if ($root === "") { $root = $_SERVER["DOCUMENT_ROOT"]; } + if ($root === null || $root === "") { $root = $_SERVER["DOCUMENT_ROOT"]; } // current directory being listed. $current_dir = $root . $path;