Procedural directory iteration : readdir « File Directory « PHP






Procedural directory iteration

 
<?php
$d = opendir('/usr/local/images') or die($php_errormsg);
while (false !== ($f = readdir($d))) {
    print $f . "\n";
}
closedir($d);
?>
  
  








Related examples in the same category

1.Listing the Contents of a Directory with readdir()
2.readdir.php