Re: [PHP] recognising plain text files

2002-05-16 Thread Rasmus Lerdorf
The uploaded mime type is set by the browser, not by PHP. So I guess in your Netscape case it isn't sending the right type. Perhaps have a look at the 'file' UNIX-level command and use that. -Rasmus On Thu, 16 May 2002, Lee P Reilly wrote: > Hi, > > I am doing some validation on files that ar

[PHP] recognising plain text files

2002-05-16 Thread Lee P Reilly
Hi, I am doing some validation on files that are being upload. I only wish to allow users to upload files that are in *plain text* format (not neccessarily with a .txt extension). I have the following piece of code, which works fine in IE, but in Netscape Navigator: if ($file_type != "text/p