Page 1 of 1

Re: File uploading code not working for .doc file type

Posted: Mon Apr 22, 2013 6:15 am
by johnj
The $_FILES['file']['type'] is a user supplied value and hence not a good candidate for validation. Use one of the fileinfo() functions, http://www.php.net/manual/en/function.finfo-file.php