-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtempnam.xml
91 lines (88 loc) · 3.44 KB
/
tempnam.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="UTF-8"?>
<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.2 -->
<!-- EN-Revision: n/a Maintainer: fernando Status: working -->
<!-- CREDITS: cortesi -->
<refentry xml:id="function.tempnam" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>tempnam</refname>
<refpurpose>Crea file con unico nome file</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizionen</title>
<methodsynopsis>
<type>string</type><methodname>tempnam</methodname>
<methodparam><type>string</type><parameter>dir</parameter></methodparam>
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
</methodsynopsis>
<para>
Crea un file con filename univoco nella directory specificata.
Se la directory non esiste, <function>tempnam</function> può
generare un file in una directory temporanea di sistema, e restituire
il nome di quest'ultima.
</para>
<para>
Precedentemente al PHP 4.0.6, il comportamento della funzione <function>tempnam</function>
dipendeva dal sistema. Su Windows il dispositivo di variabli TMP sovrascrive il
<parameter>dir</parameter> parametro, su Linux la variabile TMPDIR ha la precedenza,
mentre SVR4 utilizzerà sempre il parametro <parameter>dir</parameter> se la directory
a cui punta, esiste. Consultare la vostra documentazione sulla funzione tempnam(3) in caso di dubbi.
</para>
<note>
<simpara>
Se PHP non può creare un file nello specificato <parameter>dir</parameter>
parametro, ritorna al default di sistema.
</simpara>
</note>
<para>
Restituisce il nuovo nomefile temporaneo, o &false; in caso di
errore.
<example>
<title><function>tempnam</function> esempio</title>
<programlisting role="php">
<![CDATA[
<?php $tmpfname = tempnam("/tmp", "FOO");
$handle = fopen($tmpfname, "w");
fwrite($handle, "writing to tempfile");
fclose($handle);
// do here something
unlink($tmpfname);
?>
]]>
</programlisting>
</example>
</para>
<note>
<simpara>
Il funzionamento di questa funzione è cambiato nella 4.0.3. Il file temporaneo
è creato inoltre èer evitare un conflitto dove il file dovrebbe apparire
nel filesystem tra la volta in cui la stringa viene generata
e prima che lo script tenti di creare il file. Notare che se si necessita
cancellare il file, se non servisse più, non viene fatto
automaticamente.
</simpara>
</note>
<para>
Vedere anche <function>tmpfile</function> and <function>unlink</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
-->