note 20916 added to function.readdir
| From: | php-general at lists dot php dot net | Date: | Sun, 21 Apr 2002 21:33:18 +0000 |
| Subject: | note 20916 added to function.readdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29662@lists.php.net to get a copy of this message | ||
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;
}
}
--
http://www.php.net/manual/en/function.readdir.php
http://master.php.net/manage/user-notes.php?action=edit+20916
http://master.php.net/manage/user-notes.php?action=delete+20916
http://master.php.net/manage/user-notes.php?action=reject+20916