Forum Moderators: coopster

Message Too Old, No Replies

Script to generate links to files

view contents of a directory

         

eamonmoriarty

3:00 pm on Nov 25, 2006 (gmt 0)

10+ Year Member



On my website I intend to have a directory containing numerous files (.doc,..xls, .pdf etc) A number of people with no html knowledge will upload new files to this directory from time to time. Is there any way to automatically generate links to these files in an index page?
Alternatively, is it possible for viewers to get access to the directory and view its contents (without an index page)
I am on a Linux?Apache set up.

barns101

7:23 pm on Nov 25, 2006 (gmt 0)

10+ Year Member



You can use .htaccess to allow directory listings for that particular directory.

whoisgregg

7:39 pm on Nov 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, eamonmoriarty!

Take a look at the sample code on the opendir [php.net] manual page for an idea of how to go about building your own directory listing script. :)

jatar_k

5:24 pm on Nov 26, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld eamonmoriarty,

try the code in this thread
[webmasterworld.com...]

just replace the html in the echo to reflect what you want