|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Jan 08 00:00:02 2026 UTC |
<? $path="$DOCUMENT_ROOT/site/documents"; $current_dir=opendir($path); while ($file=readdir($current_dir)) { if (is_dir($file)) echo "dir"; if ($file != "." && $file != "..") echo "$file\n"; if (is_dir($file) && $file != "." && $file != "..") echo "$file\n"; } ?> In this program, I have 3 "if conditions". The 3rd is actually the two first put together. But the 2 first are evaluated as true and the third as wrong. Thanks for having a look at it. Cedric Schaller