Help: HTML code - auto file list

Miscellaneous Forums/General Discussion/Help: HTML code - auto file list

Does anyone have a simple bit of HTML code which will automatically list files uploaded to a site (and display them on the main index.htm page for example)?

I would think that would require a PHP script or similar... I don't think you can do it in straight HTML.

HTML is static; what you are describing is a dynamic task.

Some sites list files as you describe simply by not having an index.htm file at all. The files then just get listed in a directory structure, a la FTP sites.

However, I know some sites won't do this and require an index page. I have no idea why some do and some don't so maybe someone more savvy on these matters can explain?

http://www.google.com/search?q=htaccess+file+listing

@big10p: It's a security setting in the webserver software -- there's a flag to explicitely allow or deny directory views.

Some webserver programs default to allowing this, other deny... And many get changed for admin preference. There's a convenience by listing the files, but it can also be a potential security hazard, since you expose more information about your server than you may feel comfortable with.

Some sites list files as you describe simply by not having an index.htm file at all
Thanks big10. I'll use that method by keeping an index page and linking to folders only such as:

/myhomepage.com/pics/
/myhomepage.com/code/