mime_content_type returning text/plain for css and js files only

♀尐吖头ヾ 提交于 2019-12-02 08:14:06

The PHP doc is pretty explicit about that:

Returns the MIME content type for a file as determined by using information from the magic.mime file.

PHP and Apache don't use the same mime databases. Apache uses mime.types but PHP uses magic.mime (can't remember where it's located, /etc/ on a Unix system, I think)

No sure how to edit it on Windows but here are some tips for Linux: How to create a custom magic file database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!