Page 1 of 1

How to detect if text file is uploaded ?

Posted: Mon Mar 09, 2009 8:16 am
by markthien
Hi guys,

I need to enable user to upload only text file to my server for processing. How can I detect if the file uploaded is a real text file and not other file like virus file. i guess user can rename a virus file to a text file.

thanks & regards,
Mark

Re: How to detect if text file is uploaded ?

Posted: Mon Mar 09, 2009 10:03 am
by pickle
Maybe the Fileinfo extension?