- <?php
- if($handle=opendir('/path/to/directory')){
- echo"Directory handle: $handle\n";
- echo"Entries:\n";
- /* This is the correct way to loop over the directory. */
- while(false!==($entry=readdir($handle))){
- echo"$entry\n";
- }
- closedir($handle);}
- ?>
↧
How to list files in a directory in PHP?
↧