auto directory listing
Moderator: General Moderators
auto directory listing
is there a way with php to make it so that if a php page links to a apache directory with no webpages as in php, html. That php will auto generate a basic page with links to each of the files with in that directory? i'm looking to use a function like this for certain directory's for music files and wanted to know if this was possible so that i'm not trying to code each file to be downloadable!!!!!!....... is this possible with php? if not what other language?
Create a file in that folder called .htaccess
Enter this in the file
I think this should do but someone more experienced in htaccess can fix this.
Enter this in the file
Code: Select all
Options +Indexesdoes that already
does that already, but i was hoping that with some sort of php code that i could have it automatically list it with some html/php etc, instead of apache's default dir listing technique
You can, but you'd have to place an index.php in each folder you want php to do the work.
Take a look at http://www.php.net/glob
Take a look at http://www.php.net/glob