I am using php upload function to upload the files in my interface. I am using firefox-3.6.11 in my browser. I am uploading excel sheets. I have tried to get the uploaded file type.I have tested the file type with following way,
$Type = $HTTP_POST_FILES['TS_FILE']['type'];
$Data = split ("/", $Type,2 ) ;
if( "$Data[1]" != "vnd.ms-excel" && $Data[1]!="octet-stream" && "$Data[1]"!="xls" && "$Data[1]" != "excel" )
{
echo "<script> //alert ( 'inside alert' ) ;
alert ( 'The selected file is not in .xls format. Please select proper file.' ) ;
</script>";
exit;
}
It works fine. But some time I got the alert message as I mentioned in my code even if I upload the excel sheet. I don't know what is the exact problem. Is there any other excel file type is available in firefox versions???