Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read in directory names?

Status
Not open for further replies.

paulbradley

Programmer
Oct 9, 2002
158
GB
I know how to use

readdir($dir);

to read in the files in a directory but how do you read in the sub directory names of a given directory.

Thanks.
 
check the file type and see if its a dir using is_dir then work your way thru that dir as well

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top