?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


?
?MIME types
Author:?kostas?(195.134.85.---)
Date:???10-10-05 09:23

Hi!
I am trying to validate that a file submitted through a form is a TEXT file.
When I use $_FILES['userfile_PFAM']['type']=='text/plain' it works, but only for files with .txt extension.

But the user may also have a file containing text data and may not have given the .txt extension (for example I found that application/octet-stream also reffers to TEXT files).
Does anybody know which of the MIME types of PHP must I check for? The MIME types that reffer to TEXT I mean.

Thanx!

?Topics Author? Date
?MIME types??new
kostas 10-10-05 09:23?
?Re: MIME types??new
bastien 10-11-05 03:11?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > Hi! > I am trying to validate that a file submitted through a form > is a TEXT file. > When I use $_FILES['userfile_PFAM']['type']=='text/plain' it > works, but only for files with .txt extension. > > But the user may also have a file containing text data and > may not have given the .txt extension (for example I found > that application/octet-stream also reffers to TEXT files). > Does anybody know which of the MIME types of PHP must I check > for? The MIME types that reffer to TEXT I mean. > > Thanx! ">??

Provided By
Phorum