A simple form to select a file.
<form role="form" method="POST" action="procesaExcel.php" enctype="multipart/form-data">
<input type="file" id="inputXML" name="inputExcel" >
<button type="submit" class="btn btn-primary">Subir</button>
</form>
Now the php file that processes the form.
<?php
var_dump($_FILES["inputExcel"]["tmp_name"]);
?>
The problem is that when I upload a file with the extension * .xlsx the php file reads the content, but if the extension is * .xls what I get is null.
I have looked a bit at the types of codes for the forms:
.xls - application/vnd.ms-excel
.xlsx - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
And it does not work with either of them.
Has anyone had a similar problem?