PHP file upload on server changed mime

I have a file upload and when I test it on localhost all mime-types are ok. (txt, pdf, doc, docx, xls, xlsx)

When I test the same files on the server it changes all mime-types to application/octet-stream.

Is there any setting in PHP.ini or anywhere else to set it?

Server is using WAMP.

PHP Framework Nette


The answer as someone mentioned above is the way the RFC spec works. Check out Why am I getting mime-type of .csv file as "application/octet-stream"? for more info.


The problem was that there wasn't fileinfo extension in PHP on the server. After activating all works fine.

链接地址: http://www.djcxy.com/p/45528.html

上一篇: Laravel验证者哑剧规则不适用于文档

下一篇: 服务器上的PHP文件上传改变了MIME