Page 1 of 1

PHP Directory Index

Posted: Tue Nov 09, 2010 6:10 pm
by nyyankeefan95
Hello i am new to php and i was wondering if someone knew how to do this. I just need a simple index.php file that lists the files and folders in a directory but i need it to look exactly like this (With Bullets):
Image

Thank You In Advance

(I also need it to open the folder directory if a folder is clicked on and button for Parent Directory)

Re: PHP Directory Index

Posted: Tue Nov 09, 2010 6:52 pm
by requinix
Step 1. Don't create an index.php file.
Step 2. Configure Apache or IIS to show directory listings for that folder. Apache will probably do it without any effort; don't know about IIS.
Step 3. ???
Step 4. Profit.

Re: PHP Directory Index

Posted: Tue Nov 09, 2010 7:29 pm
by nyyankeefan95
No this is for a godaddy hosting service and if i upload this it will show me all the files i uploaded and godaddy does not provide you with automatic indexing so i liked the look of the bulleted index.

Re: PHP Directory Index

Posted: Tue Nov 09, 2010 8:07 pm
by requinix
And if you create a file called .htaccess in that directory with the contents

Code: Select all

Options +Indexes
it doesn't do the indexing for you?

Re: PHP Directory Index

Posted: Tue Nov 09, 2010 8:14 pm
by nyyankeefan95
tasairis wrote:And if you create a file called .htaccess in that directory with the contents

Code: Select all

Options +Indexes
it doesn't do the indexing for you?
I just tried that but it doesn't show it in the preferred bullet point form?

Re: PHP Directory Index

Posted: Tue Nov 09, 2010 8:48 pm
by requinix
If you don't like how it appears then customize it.