Mercurial > dirlist-php
comparison index.php @ 11:9abfd376740d
Use `||` instead of `or`.
| author | edogawaconan <me@myconan.net> |
|---|---|
| date | Wed, 22 Oct 2014 00:04:39 +0900 |
| parents | 5db51091e291 |
| children | c2a468e9f3ac |
comparison
equal
deleted
inserted
replaced
| 10:47a281c1d54e | 11:9abfd376740d |
|---|---|
| 30 | 30 |
| 31 $dir_handle = @opendir($root . $path); | 31 $dir_handle = @opendir($root . $path); |
| 32 $files = array(); | 32 $files = array(); |
| 33 $dirs = array(); | 33 $dirs = array(); |
| 34 while (($file = readdir($dir_handle)) !== false) { | 34 while (($file = readdir($dir_handle)) !== false) { |
| 35 if ($file === "." or $file === "..") { continue; } | 35 if ($file === "." || $file === "..") { continue; } |
| 36 elseif (is_dir($root . $path . $file)) { $dirs[] = $file; } | 36 elseif (is_dir($root . $path . $file)) { $dirs[] = $file; } |
| 37 else { $files[] = $file; } | 37 else { $files[] = $file; } |
| 38 } | 38 } |
| 39 sort($files); | 39 sort($files); |
| 40 sort($dirs); | 40 sort($dirs); |
