Files
doc-fr/reference/outcontrol/examples.xml
Yannick Torres c23cbeee02 sync with EN
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@256329 c90b9560-bf6c-de11-be94-00142212c4b1
2008-03-29 23:31:18 +00:00

61 lines
1.4 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.2 Maintainer: yannick Status: ready -->
<!-- Reviewed: yes -->
<appendix xml:id="outcontrol.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
<section xml:id="outcontrol.examples.basic">
&reftitle.examples;
<para>
<example>
<title>Exemple de bufferisation de sortie</title>
<programlisting role="php">
<![CDATA[
<?php
ob_start();
echo "Bonjour\n";
setcookie("cookiename", "cookiedata");
ob_end_flush();
?>
]]>
</programlisting>
</example>
</para>
<para>
Dans l'exemple ci-dessus, l'instruction <function>echo</function>
est stockée dans un buffer jusqu'à l'appel de la fonction
<function>ob_end_flush</function>. Dans le même
temps, l'appel à <function>setcookie</function> a réussi
à créer un cookie, sans générer d'erreur.
(D'habitude, vous devez envoyer les en-têtes avant les données).
</para>
</section>
</appendix>
<!-- 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
-->