php 的 mime_content_type 函数可以返回文件的类型,用法如下:
<?php
echo mime_content_type('php.gif');
echo mime_content_type('test.php');
?>
输出:
image/gif
text/plain
(adsbygoogle = window.adsbygoogle || []).push({});
来源:https://www.02405.com/archives/2332
php 的 mime_content_type 函数可以返回文件的类型,用法如下:
<?php
echo mime_content_type('php.gif');
echo mime_content_type('test.php');
?>
输出:
image/gif
text/plain
来源:https://www.02405.com/archives/2332