Mercurial > dirlist-php
comparison index.php @ 8:ac946673f830
Remove unused comments.
author | edogawaconan <me@myconan.net> |
---|---|
date | Tue, 21 Oct 2014 21:48:54 +0900 |
parents | c4046c7e1f5a |
children | 5db51091e291 |
comparison
equal
deleted
inserted
replaced
7:c4046c7e1f5a | 8:ac946673f830 |
---|---|
25 } elseif (substr($path, -1) !== "/") { | 25 } elseif (substr($path, -1) !== "/") { |
26 header("Location: " . $path . "/", false, 301); | 26 header("Location: " . $path . "/", false, 301); |
27 } | 27 } |
28 | 28 |
29 if (http_response_code() !== 200) { exit; } | 29 if (http_response_code() !== 200) { exit; } |
30 | |
31 // $link_prefix = "/"; | |
32 // $link_base = rtrim(preg_replace("#/+#", "/", urldecode($_ENV["REQUEST_URI"])),'/'); | |
33 // $link_path = substr($link_base,strlen(utf8_decode($link_prefix))); | |
34 // $path = realpath("$wwwroot/".$link_path); | |
35 // if (!$path) { die("fail"); } | |
36 | 30 |
37 $dir_handle = @opendir($root . $path); | 31 $dir_handle = @opendir($root . $path); |
38 $files = array(); | 32 $files = array(); |
39 $dirs = array(); | 33 $dirs = array(); |
40 while (($file = readdir($dir_handle)) !== false) { | 34 while (($file = readdir($dir_handle)) !== false) { |