note 41086 added to function.scandir
| From: | teunkloosterman at hotmail dot com | Date: | Mon, 29 Mar 2004 21:36:48 +0000 |
| Subject: | note 41086 added to function.scandir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67345@lists.php.net to get a copy of this message | ||
in addition to the function below, you can use this function on all platforms (when you don't
install it on your own box but on some other which could have other versions installed)
if(!function_exists("scandir"))
{
function scandir($dirstr)
{
// php.net/scandir (PHP5)
$files = array();
$fh = opendir($dirstr);
while (false !== ($filename = readdir($fh)))
{
array_push($files, $filename);
}
closedir($fh);
return $files;
}
}
----
Manual Page -- http://www.php.net/manual/en/function.scandir.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41086
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41086&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41086&report=yes
Search -- http://master.php.net/manage/user-notes.php