mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-24 09:08:13 +02:00
cdd4de5061
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@162453 c90b9560-bf6c-de11-be94-00142212c4b1
121 lines
3.7 KiB
XML
121 lines
3.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.9 $ -->
|
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<refentry id="function.mb-output-handler">
|
|
<refnamediv>
|
|
<refname>mb_output_handler</refname>
|
|
<refpurpose>
|
|
Fonction de traitement des affichages
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>mb_output_handler</methodname>
|
|
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>status</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>mb_output_handler</function> est la fonction à fournir à
|
|
<function>ob_start</function>. <function>mb_output_handler</function>
|
|
convertit les caractères envoyés au client dans l'encodage
|
|
paramétré avec <function>mb_http_output</function>.
|
|
</para>
|
|
<para>
|
|
Dans les versions 4.1.0 de &php; ou supérieures, cette fonction ajoute un
|
|
en-tête HTTP de jeu de caractères, en suivant ces conditions :
|
|
</para>
|
|
<para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
<literal>Content-Type</literal> n'a pas été défini
|
|
par la fonction <function>header</function>
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
Le type MIME par défaut commence alors par
|
|
<literal>text/</literal>
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
La configuration <literal>http_output</literal> est différente de
|
|
<literal>pass</literal>
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
<para>
|
|
<parameter>contents</parameter> : le contenu à traiter
|
|
</para>
|
|
<para>
|
|
<parameter>status</parameter> : l'état du contenu
|
|
</para>
|
|
<para>
|
|
<function>mb_output_handler</function> retourne la chaîne convertie.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>mb_output_handler</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
mb_http_output("UTF-8");
|
|
ob_start("mb_output_handler");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Si vous souhaitez envoyer des données binaires telles des images
|
|
issues d'un script &php; 4.3.0 ou suivante, <literal>Content-Type: header</literal> doit être
|
|
envoyé en utilisant la fonction <function>header</function> avant d'envoyer les données binaires
|
|
au client (e.g. header("Content-Type: image/png")).
|
|
Si <literal>Content-Type: header</literal> est envoyé, la conversion de l'encodage de sortie
|
|
ne sera pas effectuée.
|
|
</para>
|
|
<para>
|
|
Notez que si <literal>Content-Type: text/*</literal> est envoyé en utilisant la fonction
|
|
<function>header</function>, les données envoyées seront considérées comme du texte,
|
|
et la convertion sera effectuée en utilisant le jeu de caractères associé.
|
|
</para>
|
|
<para>
|
|
Si vous souhaitez envoyer des données binaires telles des images
|
|
issues d'un script &php;, vous devez spécifier l'encodage spécial
|
|
<literal>"pass"</literal>, avec la fonction
|
|
<function>mb_http_output</function>.
|
|
</para>
|
|
</note>
|
|
<para>
|
|
Voir aussi
|
|
<function>ob_start</function>.
|
|
</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
|
|
-->
|