0

Both functions (mime_content_type and finfo_file) returns wrong mime type (application/msword) of my xls file. Question is why?

This tool http://mime.ritey.com/ returns proper mime type - application/vnd.ms-excel

I use script for attachment management for webmail and it has to be very universal. How to fix problem?

Aycan Yaşıt
  • 2,106
  • 4
  • 34
  • 40
piernik
  • 3,507
  • 3
  • 42
  • 84
  • Use an up-to-date mime magic file. And are you sure that the files really are the type that they claim to be? – Mark Baker Nov 05 '13 at 12:19
  • 1
    Note that the link you've posted uses the content type passed to the upload by the browser, which is easily fooled – Mark Baker Nov 05 '13 at 12:21
  • this might help.. http://stackoverflow.com/questions/1232769/how-to-get-the-content-type-of-a-file-in-php – reikyoushin Nov 05 '13 at 13:52

0 Answers0