Re: is_dir on WIndows
| From: | Chris | Date: | Mon, 27 Sep 2004 23:19:41 +0000 |
| Subject: | Re: is_dir on WIndows | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198032@lists.php.net to get a copy of this message | ||
John Nichel wrote:
Chris wrote:while($file = readdir($handle)) { if ('.' == $file || '..' == $file) continue; if(is_dir($handle.'\\'.$file)) $users[] = $file; } That will work, but it appears you've already sorted the issue out, despite my "help". Chrisif (is_dir($file) || ($file!=".") || ($file!="..")) continue;That will match everything and anything, files and dot directories... The first statement by the OP should work fine. All three will eval to true if it is a directory, and the directory isn't . or .. Heh, you're right. I knew I didn't spend enough time on that answer... What I * should* have said was something like: