Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

List files of a Directory in php or List files of a folder from php code

Hi,

You might require this Code which lists all files from a specific directory in php. It shows the files from a folder you want.
Even you can specify which files to ignore eg. when showing image you dont want to show thumbs.db file, so you can specify in the code neglect thumbs.db file.
So your code will show all files except thumbs.db 

This is a very basic program, you can extend it to a level you want as per your requirement. If you need some help ask me, if possible definitely i will help.


In the below code there is one array $exclude, in this array you specify the files which you want to ignore in your final output, so it will not be shown. And just modify the if loop.





If you know any other way to do the same then comments are always welcome.
Dont forget to tell your friends about http://programming-in-php.blogspot.com


This post first appeared on PHP Scripts And Programs For Beginner To Master, please read the originial post: here

Share the post

List files of a Directory in php or List files of a folder from php code

×

Subscribe to Php Scripts And Programs For Beginner To Master

Get updates delivered right to your inbox!

Thank you for your subscription

×