Re: is_dir & is_file bugs?
| From: | Afan Pasalic | Date: | Tue, 08 Feb 2005 22:00:35 +0000 |
| Subject: | Re: is_dir & is_file bugs? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-208299@lists.php.net to get a copy of this message | ||
Nope! It doesnt work either...
:(
Matt M. wrote:
$path = 'product_images'; $handle = opendir($path); while (false !== ($file = readdir($handle))) {try the absolute path in is_dir and is_fileif ($file != "." && $file != "..") {echo $file;if (is_dir($file)) { echo ' <-- folder<br>'; $folders[] = $file; } elseif (is_file($file)) { echo ' <-- image<br>'; $images[] = $file; } else { echo ' <-- ???<br>'; } }}