How to get MIME type of a file in PHP 5.5?

前端 未结 8 1894
鱼传尺愫
鱼传尺愫 2020-11-30 07:10

I am using mime_content_type() in PHP 5.5 to get a MIME type, but it throws fatal: error function not found.

How can I achieve this on PHP

8条回答
  •  攒了一身酷
    2020-11-30 07:57

    mime_content_type() is not deprecated and works fine.

    Why is mime_content_type() deprecated in PHP?

    http://php.net/manual/en/function.mime-content-type.php

    As of PHP 5.3, it's even built-in.

提交回复
热议问题