readdir: Read entry from directory handle : Directory « File Directory « PHP






readdir: Read entry from directory handle


<?php
   $dh = opendir('./');
   while ($file = readdir($dh))
      echo "$file <br>";
   closedir($dh);
?>

           
       








Related examples in the same category

1.Listing the Contents of a Directory with readdir()
2.Calculate the size for a directory
3.scandir: List files and directories inside the specified path
4.The current working directory
5.Print all files under a directory
6.Read the content from a directory
7.Reading Contents from a Directory
8.Clean Path by Regular Expressions