File uploading code not working for .doc file type

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

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

Post by johnj » Mon Apr 22, 2013 6:15 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests