mirror of
https://github.com/php/doc-it.git
synced 2026-03-26 08:32:15 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314543 c90b9560-bf6c-de11-be94-00142212c4b1
68 lines
2.5 KiB
XML
68 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.32 -->
|
|
<!-- EN-Revision: n/a Maintainer: fernando Status: working -->
|
|
<refentry xml:id="function.tmpfile" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>tmpfile</refname>
|
|
<refpurpose>Crea un file temporaneo</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>resource</type><methodname>tmpfile</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para> Crea un file temporaneo con un nome univoco in modalità di lettura-scrittura (w+),
|
|
restituendo un riferimento al file simile a quello tornato da <function>fopen</function>.
|
|
Il file viene automaticamente cancellato una volta chiuso (usando
|
|
<function>fclose</function>), o quando lo script termina.
|
|
</para>
|
|
<para> Per dettagli, consulta la documentazione del tuo sistema sulla funzione
|
|
<literal>tmpfile(3)</literal>, così come il file haeader
|
|
<filename>stdio.h</filename>.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>tmpfile</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$temp = tmpfile();
|
|
fwrite($temp, "writing to tempfile");
|
|
fseek($temp, 0);
|
|
echo fread($temp, 1024);
|
|
fclose($temp); // this removes the file
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
writing toi tempfile
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<para> Vedere anche <function>tempnam</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:"~/.phpdoc/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
|
|
--> |