comparison index.php @ 27:aa3f0003fb41

Hide dotfiles.
author edogawaconan <me@myconan.net>
date Thu, 30 Oct 2014 12:05:35 +0900
parents eee7ca924a5e
children ce92f4d41714
comparison
equal deleted inserted replaced
26:eee7ca924a5e 27:aa3f0003fb41
26 26
27 $dir_handle = @opendir($dir); 27 $dir_handle = @opendir($dir);
28 $files = array(); 28 $files = array();
29 $dirs = array(); 29 $dirs = array();
30 while (($file = readdir($dir_handle)) !== false) { 30 while (($file = readdir($dir_handle)) !== false) {
31 if ($file === "." || $file === "..") { continue; } 31 if (substr($file, 0, 1) === ".") { continue; }
32 elseif (is_dir($dir . $file)) { $dirs[] = $file; } 32 elseif (is_dir($dir . $file)) { $dirs[] = $file; }
33 else { $files[] = $file; } 33 else { $files[] = $file; }
34 } 34 }
35 sort($files); 35 sort($files);
36 sort($dirs); 36 sort($dirs);