PHP: mime_content_type - Manual in Deutsh
PHP: mime_content_type - Manual in French
PHP: mime_content_type - Manual in Polish

You Are At PHP: mime_content_type - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

mime_content_type

(PHP 4 >= 4.3.0, PHP 5)

mime_content_type -- Detect MIME Content-type for a file (deprecated)

Description

string mime_content_type ( string filename )

Returns the MIME content type for a file as determined by using information from the magic.mime file.

Parameters

filename

Path to the tested file.

Return Values

Returns the content type in MIME format, like text/plain or application/octet-stream.

Notes

Warning

This function has been deprecated as the PECL extension Fileinfo provides the same functionality (and more) in a much cleaner way.

Examples

Example 1. mime_content_type() Example

<?php
echo mime_content_type('php.gif') . "\n";
echo
mime_content_type('test.php');
?>

The above example will output:

image/gif
text/plain

See Also

Fileinfo for a replacement

oprogramowanie magazynowe
Najtańszy fotograf lublin na ślub
kody kreskowe paskowe RFID Czytniki mobilne drukarki etykiet termina
Pozycjonowanie stron
Dostawca kas fiskalnych w Białymstoku

Another Useful functions:


ref.mime-magic | function.mime-content-type | function.mb-preferred-mime-name | function.mb-list-mime-names | function.imap-mime-header-decode | function.image-type-to-mime-type | function.iconv-mime-encode | function.iconv-mime-decode | function.iconv-mime-decode-headers |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.