Get all Filenames from a folder

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mhonnphp
Forum Commoner
Posts: 37
Joined: Fri Oct 12, 2007 11:29 pm
Location: Philippines
Contact:

Get all Filenames from a folder

Post by mhonnphp »

guys i got a problem.
how can i get all the filenames from the specific folder.

Example:
The "C:\Documents and Settings\Information\My Documents\" have 4 files inside.
what i want to do is to display all the files inside C:\Documents and Settings\Information\My Documents\ using the browser.
This System will run standalone.

Please help!
Thanks and God bless
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Get all Filenames from a folder

Post by s.dot »

Have a look at opendir() and readdir() or if you wish, glob().
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
mhonnphp
Forum Commoner
Posts: 37
Joined: Fri Oct 12, 2007 11:29 pm
Location: Philippines
Contact:

Re: Get all Filenames from a folder

Post by mhonnphp »

Oh.. thanks scottayy!
i used glod()
Post Reply