View Full Version : page to list all of the files in the directory?

10-08-2002, 03:17 AM
hi, i'm using Orange WebServer (hxxp://www.orangesoftware.net/orangewebserver.html) to host my website. but i want to make a webpage to just list all of the files and folders in the directory...kinda like an ftp site (so like when i move and delete stuff around in the directory the page automatically updates the links and folders). is there any way to do this and is there like a template i can download to play around with?


10-08-2002, 03:20 AM
Your host have a serverside language supported (php, asp, cgi..)? If it doesn't, I don't think you can do it.

10-08-2002, 03:28 AM
i think it does support CGI and PHP

10-08-2002, 06:24 AM
With my isp anyhow...

I uploaded a page with a dummy link
<a href="">Anything here</a>

and clicking on the link brings on all the files within that directory. Works with IE5.5 and NN4.7 (not NN7).

10-09-2002, 12:46 AM
it does support asp. does anyone know of any asp scripts that will do this?

10-09-2002, 02:29 AM
Maybe something like this?


(stuff in the green table). I don't know ASP but I'm sure you could delete everything from there and just show the page as a real directory page.

10-09-2002, 09:56 PM
looks like it would work perfect...lets see if i can get it to work. :)

10-09-2002, 10:07 PM
so it just supports asp? or php as well?

if it supports php, crack open notepad or your txt editor of choice and type the following in:

if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<a href='$file'>$file</a><br>";

save it as 'index.php' (or whatever you like) and upload. :thumbsup:

or d/l the attached readymade one.


10-09-2002, 11:12 PM
thanks mat, i downloaded the script and when i tested it this is what came out (http://windowstips.homestead.com/files/Image1.jpg) i'm pretty sure that the server supports php. do i have to configure anything?

10-09-2002, 11:19 PM
whoops...it's my fault. Orange Web Server doesnot support php...but i found a diffrent one that does and it works great!

thanks for everyone's help!