I've looked at a bunch of information online about MIME types. I want to do something along these lines; can someone help me straighten out my syntax for .doc (Word) attachments?
I want to allow html, rtf, doc, and text for now. Will this work?
//now look to see what type of file is being uploaded
// $userfile_type is mime type e.g. image/gif
$userfile_type = $HTTP_POST_FILES['attfile']['type'];
if($userfile_type != ("application/doc" || "text/plaintext" || "text/richtext" || "text/rtf" || "text/html" || "text/htm")) {
echo "This isn't a valid file.";
die();
}
Thanks,
Eve