title: How to check is upload file is CSV or XLS
body: <p>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(<code>readCSV()</code> and <code>readXLS()</code>). when i upload CSV or XLS file that gave to me same file type</p>
  
  <pre><code>if(file_type($my_file) =='CSV'){
    readCSV();
  }else{
    readXLS();
  }
  </code></pre>
  
  <p>How can i write file_type() function for get separate result for CSV and XLS files</p>