PHP查看文件的MIME类型 $path='文件路径';$finfo = finfo_open(FILEINFO_MIME_TYPE);$mime_type = finfo_file($finfo, $path);