How do you display a list of files in a directory on a page on a website?
anonymous
2008-11-29 10:36:07 UTC
So that it updates immediately when you upload a new file to that directory. Is it possible?
Three answers:
Some Guy
2008-11-29 10:50:35 UTC
If you want a landing page for that directory, and not *just* an index of the files, then using ASP or PHP, the answer is "yes".
Add some code that iterates through all the files, and then displays them in a sorted list. Upload a file, refresh the page, done.
In ASP, use the FileSystemObject's Folder and Files collections to get the list of files; in PHP, there's the ScanDir function that returns an array of all files.
Otherwise (only if your web server is Apache), simply add the line
Options +Indexes
to the start of your .htaccess file for that folder, and don't have a landing page.
coe
2016-11-17 12:21:08 UTC
I surely have the maximum up-to-date version of techniques superhighway explorer. as quickly as I scroll down there's a crimson x on the the stunning decision component of the techniques superhighway internet website adress. If its no longer there bypass to favorites, historic previous, the date, proper click, delete. that ought to choose to artwork.
JayDax
2008-11-29 10:43:22 UTC
It is if you have ftp access to the site.
it's also possible on some sites where there is no index.htm page created for a folder
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.