reference/filesystem/functions/tempnam.xml
d1cacac75c04a115ee9b464015ce8e7782bd1517
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.tempnam">
3
+
<refentry xml:id="function.tempnam" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>tempnam</refname>
6
6
<refpurpose>Create file with unique file name</refpurpose>
...
...
@@ -9,8 +9,8 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>string</type><methodname>tempnam</methodname>
13
-
<methodparam><type>string</type><parameter>dir</parameter></methodparam>
12
+
<type class="union"><type>string</type><type>false</type></type><methodname>tempnam</methodname>
13
+
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
14
14
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
...
...
@@ -26,7 +26,7 @@
26
26
<para>
27
27
<variablelist>
28
28
<varlistentry>
29
-
<term><parameter>dir</parameter></term>
29
+
<term><parameter>directory</parameter></term>
30
30
<listitem>
31
31
<para>
32
32
The directory where the temporary filename will be created.
...
...
@@ -41,7 +41,8 @@
41
41
</para>
42
42
<note>
43
43
<simpara>
44
-
Windows uses only the first three characters of prefix.
44
+
Only the first 63 characters of the prefix are used, the rest are ignored.
45
+
Windows uses only the first three characters of the prefix.
45
46
</simpara>
46
47
</note>
47
48
</listitem>
...
...
@@ -58,6 +59,29 @@
58
59
</para>
59
60
</refsect1>
60
61

62
+
<refsect1 role="changelog">
63
+
&reftitle.changelog;
64
+
<informaltable>
65
+
<tgroup cols="2">
66
+
<thead>
67
+
<row>
68
+
<entry>&Version;</entry>
69
+
<entry>&Description;</entry>
70
+
</row>
71
+
</thead>
72
+
<tbody>
73
+
<row>
74
+
<entry>7.1.0</entry>
75
+
<entry>
76
+
<function>tempnam</function> now emits a notice when falling back to the
77
+
temp directory of the system.
78
+
</entry>
79
+
</row>
80
+
</tbody>
81
+
</tgroup>
82
+
</informaltable>
83
+
</refsect1>
84
+

61
85
<refsect1 role="examples">
62
86
&reftitle.examples;
63
87
<para>
...
...
@@ -72,7 +96,7 @@ $handle = fopen($tmpfname, "w");
72
96
fwrite($handle, "writing to tempfile");
73
97
fclose($handle);
74
98

75
-
// do here something
99
+
// do something here
76
100

77
101
unlink($tmpfname);
78
102
?>
...
...
@@ -86,9 +110,9 @@ unlink($tmpfname);
86
110
&reftitle.notes;
87
111
<note>
88
112
<simpara>
89
-
If PHP cannot create a file in the specified <parameter>dir</parameter>
113
+
If PHP cannot create a file in the specified <parameter>directory</parameter>
90
114
parameter, it falls back on the system default. On NTFS this also happens
91
-
if the specified <parameter>dir</parameter> contains more than 65534 files.
115
+
if the specified <parameter>directory</parameter> contains more than 65534 files.
92
116
</simpara>
93
117
</note>
94
118
</refsect1>
...
...
@@ -105,7 +129,6 @@ unlink($tmpfname);
105
129
</refsect1>
106
130

107
131
</refentry>
108
-

109
132
<!-- Keep this comment at the end of the file
110
133
Local variables:
111
134
mode: sgml
112
135