Is the Upload file type Limited to EXCEL? Use this if ($ _ FILES [excel_file] [type]! Applicationvnd. ms-excel) does not seem to be an EXCEL version Problem. how can I solve it? solution -------------------- $ imgtypestrtolower (strrchr ($ _ FILES [e restrict the Upload file type to EXCEL?
Use this if ($ _ FILES ['Excel _ file'] ['type']! = 'Application/vnd. ms-excel ') does not seem to work.
It may be an EXCEL version. how can this problem be solved?
------ Solution --------------------
$ Imgtype = strtolower (strrchr ($ _ FILES ['Excel _ file'] ['name'], "."); // get the extension
If({imagetype}}'.xls '| your imagetype;{'.xlsx') {// Other formats may exist. Add it on your own.
.........
} Else {
.......
}
------ Solution --------------------
The method on the fifth floor is good. I have been using it.
I have studied it before and found that some formats display different MIME types in different browsers... It is even empty.
Determining the suffix is the most direct