I upload a CSV or XLS file and import the contents of this file into a database. There are two separate CSV file reading method and XLS ( readCSV()and readXLS()). when i upload a csv or xls file that gave me the same file type
if(file_type($my_file) =='CSV'){
readCSV();
}else{
readXLS();
}
How can I write the file_type () function to get a separate result for CSV and XLS files
source
share