php验证文件mime类型的函数mime_content_type 0 By 董德多 on 2021年8月27日 PHP php 的 mime_content_type 函数可以返回文件的类型,用法如下: <?php echo mime_content_type('php.gif'); echo mime_content_type('test.php'); ?> 输出: image/gif text/plain mime