For me mime_content_type didn't work in Linux before I added
mime_magic.magicfile = "/usr/share/magic.mime"
to php.ini (remember to find the correct path to mime.magic)
![]() |
|
||||||||||
|
mime_content_typeОписаниеstring mime_content_type ( string filename )Returns the MIME content type for a file as determined by using information from the magic.mime file. Возвращаемые значенияReturns the content type in MIME format, like text/plain or application/octet-stream. Примечания
mime_content_type
Sune Jensen
29-Aug-2007 09:16
For me mime_content_type didn't work in Linux before I added
dt at php dot net
14-Jun-2007 08:18
<?php
Quis at IHAVEGOTSPAMENOUGH dot omicidio dot nl
12-Feb-2007 09:28
<?PHP
tree2054 using hotmail
03-Nov-2006 05:59
The correct little correction:
15-Oct-2006 07:06
if you use a transparent 'spacer' GIF i've found it needs to be a around 25x25 for it to register as 'image/gif'. otherwise it's read in as 'text/plain'.
webmaster at cafe-clope dot net
23-Feb-2006 05:31
Completing <some dude AT somewhere DOT com> comment:
Y0Gi
25-Jan-2006 11:13
The 'file' utility fortunately is available for Windows, too:
some dude AT somewhere DOT com
07-Oct-2005 09:44
I added these two lines to my magic.mime file:
ginnsu at arcee dot ca
08-Mar-2005 10:14
The function mime_content_type only worked for me on Microsoft Windows after I added the directive "mime_magic.debug" to my php.ini with the value of "On". The default value appears to be "Off". Exampe: |