hholzgra Tue Jun 11 06:14:50 2002 EDT Added files: /phpdoc/en/reference/mime_magic .cvsignore functions.xml reference.xml /phpdoc/en/reference/mime_magic/functions mime-content-type.xml
Modified files: /phpdoc manual.xml.in Log: started to document my mime_magic extension Index: phpdoc/manual.xml.in diff -u phpdoc/manual.xml.in:1.121 phpdoc/manual.xml.in:1.122 --- phpdoc/manual.xml.in:1.121 Tue Jun 4 04:46:13 2002 +++ phpdoc/manual.xml.in Tue Jun 11 06:14:50 2002 @@ -131,6 +131,7 @@ &reference.mcal.reference; &reference.mcrypt.reference; &reference.mhash.reference; + &reference.mime_magic.reference; &reference.mssql.reference; &reference.ming.reference; &reference.misc.reference; Index: phpdoc/en/reference/mime_magic/.cvsignore +++ phpdoc/en/reference/mime_magic/.cvsignore functions.xml Index: phpdoc/en/reference/mime_magic/functions.xml +++ phpdoc/en/reference/mime_magic/functions.xml &reference.mime-magic.functions.mime-content-type; Index: phpdoc/en/reference/mime_magic/reference.xml +++ phpdoc/en/reference/mime_magic/reference.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <reference id="ref.mime-magic"> <title>Mimetype Functions</title> <titleabbrev>Mimetype</titleabbrev> <partintro> <section id="mime-magic.intro"> &reftitle.intro; <para> The functions in this module try to guess the content type and encoding of a file by looking for certain <emphasis>magic</emphasis> byte sequences at specific positions within the file. While this is not a bullet proof approach the heuristics used do a very good job. </para> <para> This extension is derivated from Apache mod_mime_magic, which is itself based on the <filename>file</filename> command maintaind by Ian F. Darwin. See the source code for further historic and copyright information. </para> </section> <section id="mime-magic.requirements"> &reftitle.required; &no.requirement; </section> <section id="mime-magic.installation"> &reftitle.install; <para> The extension needs a copy of the <filename>magic.mime</filename> as distributed with the <filename>file</filename> command. This file also part of most recent Linux distributions and usually stored in the <filename>/usr/share/misc</filename> directory. </para> </section> <section id="mime-magic.configuration"> &reftitle.runtime; <table> <title>MIME magic Configuration options</title> <tgroup cols="3"> <thead> <row> <entry>Name</entry> <entry>Default</entry> <entry>Changeable</entry> </row> </thead> <tbody> <row> <entry>mime_magic.magicfile</entry> <entry>"/usr/share/misc/magic.mime"</entry> <entry>PHP_INI_SYSTEM</entry> </row> </tbody> </tgroup> </table> </section> <section id="mime-magic.resources"> &reftitle.resources; &no.resource; </section> <section id="mime-magic.constants"> &reftitle.constants; &no.constants; </section> </partintro> &reference.mime-magic.functions; </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc/en/reference/mime_magic/functions/mime-content-type.xml +++ phpdoc/en/reference/mime_magic/functions/mime-content-type.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.mime-content-type"> <refnamediv> <refname>mime_content_type</refname> <refpurpose>Detect MIME Content-type for a file</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>mime_content_type</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <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> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->