Getting file icons for directory list

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
Pineriver
Forum Commoner
Posts: 50
Joined: Fri Aug 15, 2003 5:24 pm

Getting file icons for directory list

Post by Pineriver »

Hi, I am working on a script in PHP that its main purpose is to show all files in a directory similar to the way apache directories look.
I have everything done except one thing that I can find out, how to get the icons that appear at the left for each file on the directory list.

I am assuming the script looks at the file extensions but would I then have to include with the script every icons to any file and a rather long array telling what icons should go with files?

I know some webservers already have the icons installed /icons/ but my problem is associating them with the file types..
Any help would be appreciate
Thanks
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

I'm not completely sure but i think that a big array is the only way.
Post Reply