note 13671 deleted from function.is-dir by jimw

From: Date: Thu, 18 Apr 2002 21:27:44 +0000
Subject: note 13671 deleted from function.is-dir by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29548@lists.php.net to get a copy of this message
is_dir wouldn't work with anything suggested above. Using opendir('.') was the only working method. This method will allow relative or full paths. See below for example: chdir('../path/to/examine'); $dir = opendir('.'); while (($file = readdir($dir)) !==false) { if ($file != '.' && $file != '..' && !is_dir("$file")) { echo "$file\n"; } } Details: -------- OS: SunOS 5.8 SPARC (solaris 8) PHP: 4.0.5 APACHE: 1.3.20

« previous php.notes (#29548) next »