Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

PHP Script For Listing Files In A Given Directory

DZone's Guide to

PHP Script For Listing Files In A Given Directory

·
Free Resource
http://uk2.php.net/scandir returns a list of all files in a directory into an array. You can then use a foreach statement to print each one out: 


   $value){
echo $value; //You could add an icon in here maybe, a link to the file/directory, or a link to list files in that directory
}
?> 
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}