Reading Dirs...

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
test123
Forum Newbie
Posts: 2
Joined: Sun Sep 21, 2003 11:46 am

Reading Dirs...

Post by test123 »

Hello,

from a given directory (for example "www.test.com") I have to search the subdirectories for an special file - so I need a function (or something ;-) that automatically searches a directory with its subdirectories till there is the file. I am trying for nearly a week now, and I will get mad about it ;-)

Perhaps somebody could help me - or give me a wink...

thx.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

rom a given directory (for example "www.test.com")
can you access it locally (like /usr/httpd/htdocs/...)?
test123
Forum Newbie
Posts: 2
Joined: Sun Sep 21, 2003 11:46 am

Post by test123 »

Yes. The "Way" to the file should be saved in a var or an array.
User avatar
SantaGhost
Forum Commoner
Posts: 41
Joined: Mon Sep 15, 2003 11:54 am

Post by SantaGhost »

take a look at:

http://nl.php.net/manual/en/function.readdir.php

its allways wise to check the manual for possible soutions to your problem, if you encounter problems iplementing the code let me know
Post Reply