It is said in many article about securing file upload that it is better to prepare a white list of extension instead of a blacklist. But it seems this method has some problem with double extension files. For example I have a whitelist like 'pdf','doc','docx' but this white list return true for apple.php.doc or apple.doc.php .It is said in many article about securing file