mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
ref.mime_magic: switch to new style
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@227753 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8cbba5cccf
commit
25e29ba7ec
1 changed files with 56 additions and 7 deletions
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.mime-content-type">
|
||||
<refnamediv>
|
||||
<refname>mime_content_type</refname>
|
||||
<refpurpose>Detect MIME Content-type for a file</refpurpose>
|
||||
<refpurpose>Detect MIME Content-type for a file (deprecated)</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>mime_content_type</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
|
@ -14,12 +15,49 @@
|
|||
<para>
|
||||
Returns the MIME content type for a file as determined by using
|
||||
information from the <filename>magic.mime</filename> file.
|
||||
Content types are returned in MIME format, like <literal>text/plain</literal>
|
||||
or <literal>application/octet-stream</literal>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Path to the tested file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the content type in MIME format, like
|
||||
<literal>text/plain</literal> or <literal>application/octet-stream</literal>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<warning>
|
||||
<para>
|
||||
This function has been deprecated as the PECL extension
|
||||
<link linkend="ref.fileinfo">Fileinfo</link> provides the same
|
||||
functionality (and more) in a much cleaner way.
|
||||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mime_content_type</function> example</title>
|
||||
<title><function>mime_content_type</function> Example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -38,6 +76,17 @@ text/plain
|
|||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member>
|
||||
<link linkend="ref.fileinfo">Fileinfo</link> for a replacement
|
||||
</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue