PHP Directory Index

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nyyankeefan95
Forum Newbie
Posts: 4
Joined: Tue Nov 09, 2010 6:03 pm

PHP Directory Index

Post 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)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP Directory Index

Post 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.
nyyankeefan95
Forum Newbie
Posts: 4
Joined: Tue Nov 09, 2010 6:03 pm

Re: PHP Directory Index

Post 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.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP Directory Index

Post 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?
nyyankeefan95
Forum Newbie
Posts: 4
Joined: Tue Nov 09, 2010 6:03 pm

Re: PHP Directory Index

Post 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?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP Directory Index

Post by requinix »

If you don't like how it appears then customize it.
Post Reply