directory listing php script
mattg <[email protected]> Wed, 29 Oct 2003 11:17:59 -0500
| Newsgroups | gmane.network.mathopd |
|---|---|
| Message-ID | <[email protected]> |
here is a php hack to list contents of a directory. might not be as quick as c or perl, but does the job. just place it in whatever directory you want to list the contents of, and call it index.php i'm not sure if this will work with the AutoIndexCommand parameter yet or not. i'm still testing. here is the url: http://apathy.guiltyparty.org/u/doc/dir_list.phps mattg [email protected] wrote: >>is there a way to get mathopd to list contents of a directory without >>having an index file? i have folders with lots of files, but no >>index.html, so it gives me a 404. > > > Right, this is now implemented in the new beta, which I have just put > online. > > If you want to auto-index a directory (and all subdirectories), use > something like > > Control { > Alias /some-alias > Location /some-location > AutoIndexCommand /usr/local/libexec/dir.cgi > } > > The AutoIndexCommand must be a CGI script that lists the contents of the > current directory. I believe someone posted a PHP auto-indexer to this > list some time ago. I have also hacked together a simple lister in C (see > www.mathopd.org/faq.html for details.) > > Cheers > Michiel