Anmelden | Registrieren | FAQ
Anonymous

What is the best way to know MIME types?

+ Antwort erstellen

3 Beiträge Seite 1 von 1


What is the best way to know MIME types?

von emily008 » Mi Okt 07, 2015 2:57 pm

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

emily008

  • Beiträge: 8
  • Registriert: Mi Okt 07, 2015 6:29 am
  • Wohnort: London
--
For more visit HTML Tutorial

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

von Farhin Qureshi » Fr Jan 06, 2017 10:38 am

Hi Emily008
You can use the following code to know MIME type:
Code: Alles auswählen
<?php
echo mime_content_type('php.gif') . "\n";
echo mime_content_type('test.php');
?>


The above example will output:

image/gif
text/plain

Thanks.
Benutzeravatar

Farhin Qureshi

  • Beiträge: 45
  • Registriert: Di Jan 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com

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

von taynguyenem » Fr Aug 17, 2018 7:26 am

Hi guy
This is type and extentions of file input.
Benutzeravatar

taynguyenem

  • Beiträge: 20
  • Registriert: Mo Feb 05, 2018 3:28 pm
--
Preview site only Html: teamviewdownload.com, winrarfree.net


+ Antwort erstellen

Seite 1 von 1