note 20916 deleted from function.readdir by tomsommer
| From: | tomsommer@php.net | Date: | Sun, 27 Jun 2004 13:13:48 +0000 |
| Subject: | note 20916 deleted from function.readdir by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71883@lists.php.net to get a copy of this message | ||
Note Submitter:
----
To get all non-directory files in a directory [security etc]
$dir = (".")
/* use "." for the current directory, or change this to the directory's name */
while ($file = readdir($dir)) {
if (!is_dir($file)) {
$list_of_files[] = $file;
}
}