I have a module where there is a file upload which accepts any file but it should only process csv files. If there is someother file then it should say invalid file. I have written a code but even when I upload a CSV file it doesnt recognise it as a CSV file. My code is
if($_FILES['file']['type'] != "application/vnd.ms-excel"){
die("This is not a CSV file.");
}