Reputation: 673
I created a function to check the file extension of and imported Excel file. I have run same source on 2 different PCs.
PC-1 Configuration:
PC-2 Configuration:
My Excel file was created by Google Spreadsheet and exported as an MS Office file with extension .xlsx.
In PC-1, when I debug the $_FILES['file']['type'];
value I get the extension:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
Yet on PC-2, I received:
'application/octet-stream'
My question is: Why with same source, same import file, just different environments, does the debug output show a different file extension? Is the cause installing MS Office?
Upvotes: 6
Views: 636