I upload CSV or XLS file and import that file content in to the data base. There is two separate method for read CSV and XLS file read(readCSV()
and readXLS()
). when i upload CSV or XLS file that gave to me same file type
if(file_type($my_file) =='CSV'){
readCSV();
}else{
readXLS();
}
How can i write file_type() function for get separate result for CSV and XLS files