reference/network/functions/headers-sent.xml
b4989f5c1f052314ff2c36e9cc3d56b3a7a24e9b
...
...
@@ -10,8 +10,8 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>headers_sent</methodname>
13
-
<methodparam choice="opt"><type>string</type><parameter role="reference">file</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter role="reference">line</parameter></methodparam>
13
+
<methodparam choice="opt"><type>string</type><parameter role="reference">filename</parameter><initializer>&null;</initializer></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter role="reference">line</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Checks if or where headers have been sent.
...
...
@@ -29,15 +29,21 @@
29
29
<para>
30
30
<variablelist>
31
31
<varlistentry>
32
-
<term><parameter>file</parameter></term>
32
+
<term><parameter>filename</parameter></term>
33
33
<listitem>
34
34
<para>
35
-
If the optional <parameter>file</parameter> and
35
+
If the optional <parameter>filename</parameter> and
36
36
<parameter>line</parameter> parameters are set,
37
37
<function>headers_sent</function> will put the PHP source file name
38
-
and line number where output started in the <parameter>file</parameter>
38
+
and line number where output started in the <parameter>filename</parameter>
39
39
and <parameter>line</parameter> variables.
40
40
</para>
41
+
<note>
42
+
<para>
43
+
If the output has started before executing the PHP source file (for example due to a startup error),
44
+
the <parameter>filename</parameter> parameter will be set to an empty string.
45
+
</para>
46
+
</note>
41
47
</listitem>
42
48
</varlistentry>
43
49
<varlistentry>
...
...
@@ -119,7 +125,6 @@ if (!headers_sent($filename, $linenum)) {
119
125
</refsect1>
120
126

121
127
</refentry>
122
-

123
128
<!-- Keep this comment at the end of the file
124
129
Local variables:
125
130
mode: sgml
126
131