I am trying to get the true value, but result always show false, how to fix this case?
$allow = array(
"pdf"=>"application/pdf",
"doc"=>"application/msword",
"docx"=>"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"docx"=>"application/zip"
);
if (in_array("application/vnd.openxmlformats-officedocument.wordprocessingml.document",$allow)) {
echo "true";
} else {
echo "false";
}
In this case, I have two *.docx file but the mime type is different, how to allow both of them???