reference/filesystem/functions/fopen.xml
ea62fb83196997032641b50fe44420305466195e
...
...
@@ -9,11 +9,11 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>fopen</methodname>
12
+
<type class="union"><type>resource</type><type>false</type></type><methodname>fopen</methodname>
13
13
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
14
14
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
15
15
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>&false;</initializer></methodparam>
16
-
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
16
+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
<function>fopen</function> binds a named resource, specified by
...
...
@@ -123,9 +123,8 @@ $handle = fopen("c:\\folder\\resource.txt", "r");
123
123
<row>
124
124
<entry><literal>'w+'</literal></entry>
125
125
<entry>
126
-
Open for reading and writing; place the file pointer at
127
-
the beginning of the file and truncate the file to zero
128
-
length. If the file does not exist, attempt to create it.
126
+
Open for reading and writing; otherwise it has the
127
+
same behavior as <literal>'w'</literal>.
129
128
</entry>
130
129
</row>
131
130
<row>
...
...
@@ -244,6 +243,14 @@ $handle = fopen("c:\\folder\\resource.txt", "r");
244
243
<literal>'b'</literal> mode instead.
245
244
</para>
246
245
</note>
246
+
<note>
247
+
<simpara>
248
+
The <parameter>mode</parameter> is ignored for <filename>php://output</filename>,
249
+
<filename>php://input</filename>, <filename>php://stdin</filename>,
250
+
<filename>php://stdout</filename>, <filename>php://stderr</filename> and
251
+
<filename>php://fd</filename> stream wrappers.
252
+
</simpara>
253
+
</note>
247
254
</listitem>
248
255
</varlistentry>
249
256
<varlistentry>
250
257