mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-29 12:22:19 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@257223 c90b9560-bf6c-de11-be94-00142212c4b1
101 lines
2.4 KiB
XML
101 lines
2.4 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.16 $ -->
|
|
<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.tmpfile">
|
|
<refnamediv>
|
|
<refname>tmpfile</refname>
|
|
<refpurpose>Crée un fichier temporaire</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>resource</type><methodname>tmpfile</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Crée un fichier temporaire avec un nom unique, ouvert
|
|
en écriture et lecture (<literal>w+</literal>), et
|
|
retourne un pointeur de fichier.
|
|
</para>
|
|
<para>
|
|
Ce fichier sera automatiquement effacé lorsqu'il sera
|
|
fermé (avec <function>fclose</function>), ou lorsque le script
|
|
sera terminé.
|
|
</para>
|
|
<para>
|
|
Pour plus de détails, consultez votre documentation système
|
|
sur la fonction <literal>tmpfile(3)</literal>, et sur
|
|
<filename>stdio.h</filename>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne un pointeur de fichier, identique à celui retourné
|
|
par la fonction <function>fopen</function>, pour le nouveau
|
|
fichier, ou &false; si une erreur survient.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>tmpfile</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$temp = tmpfile();
|
|
fwrite($temp, "Écriture dans le fichier temporaire");
|
|
fseek($temp, 0);
|
|
echo fread($temp, 1024);
|
|
fclose($temp); // ceci va effacer le fichier
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
writing to tempfile
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>tempnam</function></member>
|
|
<member><function>sys_get_temp_dir</function></member>
|
|
</simplelist>
|
|
</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
|
|
--> |