note 41086 deleted from function.scandir by aidan
| From: | aidan@php.net | Date: | Fri, 02 Jul 2004 06:08:04 +0000 |
| Subject: | note 41086 deleted from function.scandir by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72305@lists.php.net to get a copy of this message | ||
Note Submitter: teunkloosterman@hotmail.com
----
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;
}
}