reference/filesystem/functions/readfile.xml
ea62fb83196997032641b50fe44420305466195e
...
...
@@ -9,10 +9,10 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>int</type><methodname>readfile</methodname>
12
+
<type class="union"><type>int</type><type>false</type></type><methodname>readfile</methodname>
13
13
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
14
14
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>&false;</initializer></methodparam>
15
-
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
18
Reads a file and writes it to the output buffer.
...
...
@@ -44,9 +44,7 @@
44
44
<varlistentry>
45
45
<term><parameter>context</parameter></term>
46
46
<listitem>
47
-
<para>
48
-
A context stream <type>resource</type>.
49
-
</para>
47
+
&note.context-support;
50
48
</listitem>
51
49
</varlistentry>
52
50
</variablelist>
...
...
@@ -56,12 +54,16 @@
56
54
<refsect1 role="returnvalues">
57
55
&reftitle.returnvalues;
58
56
<para>
59
-
Returns the number of bytes read from the file. If an error
60
-
occurs, &false; is returned and unless the function was called as
61
-
@<function>readfile</function>, an error message is printed.
57
+
Returns the number of bytes read from the file on success,
58
+
&return.falseforfailure;
62
59
</para>
63
60
</refsect1>
64
61

62
+
<refsect1 role="errors">
63
+
&reftitle.errors;
64
+
&fs.emits.warning.on.failure;
65
+
</refsect1>
66
+

65
67
<refsect1 role="examples">
66
68
&reftitle.examples;
67
69
<para>
...
...
@@ -110,7 +112,6 @@ if (file_exists($file)) {
110
112
</note>
111
113

112
114
&tip.fopen-wrapper;
113
-
&note.context-support;
114
115
</refsect1>
115
116
116
117
<refsect1 role="seealso">
117
118