Page 1 of 1

Reading a folder, advanced :(

Posted: Fri Jul 25, 2003 3:37 pm
by nick2
Well I really have no idea how to do what I need.

I want to be able to read all the .txt files in my data folder.

and then some how make each txt file into a link you can click to open it.

I am not asking you to write the code just maybe some guide lines on how and what to do!

thanks,
nick 8)

Posted: Fri Jul 25, 2003 3:59 pm
by DuFF
These 2 functions will allow you to open and read all the files in a specified directory:

opendir()
readdir()

In fact, there is an example of how to list all the files in a directory on the readdir() page. All you need to do then is add dynamic links with the path /$filesdirectory/$file. Hope this helps.

Posted: Fri Jul 25, 2003 4:27 pm
by nick2
thx duff just tryn to understand it.. er do both of those go together?

plz help me ;(