$_FILES['BidFile']['type'] (what are the different types?)

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
lilsavgrad01
Forum Newbie
Posts: 9
Joined: Thu Jun 09, 2005 9:50 am

$_FILES['BidFile']['type'] (what are the different types?)

Post by lilsavgrad01 »

Hey all,

I've done all kinds of searches, but nothing comes up with what I need.

I need to make sure that people using a certain section of my website can only upload text files. I know that I need to use this:

$_FILES['BidFile']['type'] = "something/something"

to specify what type I want, but when I search that online, all I find in examples is image/gif, can anyone please either point me in the direction of a listing of all possible file types or just tell me what the wording is for a text file? meaning, .doc, .txt., and files like that

thanks in advance
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

If you are a Opera user you can find mime-types and extensions easily in Settings. Or you can take a look in http://www.webmaster-toolkit.com/mime-types.shtml
(Google search 'mime-types list'
lilsavgrad01
Forum Newbie
Posts: 9
Joined: Thu Jun 09, 2005 9:50 am

Post by lilsavgrad01 »

awesome, this was exactly what I've been looking for, thanks
Post Reply