Create a new filesystem iterator in PHP
Description
The following code shows how to create a new filesystem iterator.
Example
<?php/*from www . j a v a2s. c o m*/
$it = new FilesystemIterator(dirname(__FILE__));
foreach ($it as $fileinfo) {
echo $fileinfo->getFilename() . "\n";
}
?>
The code above generates the following result.