what is the best way to get files form a directory?

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
jalbey
Forum Newbie
Posts: 1
Joined: Tue Feb 22, 2005 6:36 pm
Location: Northern Maine

what is the best way to get files form a directory?

Post by jalbey »

Ok here is what I am doing; I am taking an array of file types (i.e. extensions, .cs, .txt, .doc etc) then searching for those files in a declared directory. I want to find those file types in the directory then display them in HTML. My question is what is the best way to accomplish this.

Sorry if this has already been posted somewhere before.

Thanks,
CJ
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

opendir()/readdir() or glob()

glob() requires php 4.3.0 or newer..


If you search the forum for those function names, you should come up with a list of many many threads about this.
Post Reply