登录 | 注册 | FAQ
Anonymous

What is the best way to know MIME types?

+ 发表回复

3 篇帖子 分页: 1 / 1


What is the best way to know MIME types?

emily008 » 周三 10月 07, 2015 2:57 pm

What is the best way to find the MIME type of a file? Please give the PHP code.
头像

emily008

  • 帖子: 8
  • 注册: 周三 10月 07, 2015 6:29 am
  • 地址: London
--
For more visit HTML Tutorial

Re: What is the best way to know MIME types?

Farhin Qureshi » 周五 1月 06, 2017 10:38 am

Hi Emily008
You can use the following code to know MIME type:
代码: 全选
<?php
echo mime_content_type('php.gif') . "\n";
echo mime_content_type('test.php');
?>


The above example will output:

image/gif
text/plain

Thanks.
头像

Farhin Qureshi

  • 帖子: 45
  • 注册: 周二 1月 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com

Re: What is the best way to know MIME types?

taynguyenem » 周五 8月 17, 2018 7:26 am

Hi guy
This is type and extentions of file input.
头像

taynguyenem

  • 帖子: 20
  • 注册: 周一 2月 05, 2018 3:28 pm
--
Preview site only Html: teamviewdownload.com, winrarfree.net


+ 发表回复

分页: 1 / 1