reference/outcontrol/functions/flush.xml
91ab4f5f898023b0eed0e642e1482ac11f749d20
...
...
@@ -13,39 +13,33 @@
13
13
<void/>
14
14
</methodsynopsis>
15
15
<para>
16
-
Flushes the system write buffers of PHP and whatever backend PHP is using (CGI,
17
-
a web server, etc). This attempts to push current output all the way to
18
-
the browser with a few caveats.
19
-
</para>
20
-
<para>
21
-
<function>flush</function> may not be able to override the buffering scheme
22
-
of your web server and it has no effect on any client-side buffering in the
23
-
browser. It also doesn't affect PHP's userspace output buffering mechanism.
24
-
This means <function>ob_flush</function> should be called before <function>flush</function>
25
-
to flush the output buffers if they are in use.
26
-
</para>
27
-
<para>
28
-
Several servers, especially on Win32, will still buffer the output from
29
-
your script until it terminates before transmitting the results to the
30
-
browser.
31
-
</para>
32
-
<para>
33
-
Server modules for Apache like mod_gzip may do buffering of their own that
34
-
will cause <function>flush</function> to not result in data being sent
35
-
immediately to the client.
36
-
</para>
37
-
<para>
38
-
Even the browser may buffer its input before displaying it. Netscape, for
39
-
example, buffers text until it receives an end-of-line or the beginning of
40
-
a tag, and it won't render tables until the &lt;/table&gt; tag of the
41
-
outermost table is seen.
42
-
</para>
43
-
<para>
44
-
Some versions of Microsoft Internet Explorer will only start to display
45
-
the page after they have received 256 bytes of output, so you may need to
46
-
send extra whitespace before flushing to get those browsers to display the
47
-
page.
16
+
Flushes the system write buffers of PHP and the backend used by PHP
17
+
(e.g.: CGI, a web server).
18
+
In a command line environment <function>flush</function>
19
+
will attempt to flush the contents of the buffers only
20
+
whereas in a web context headers and the contents of the buffers are flushed.
48
21
</para>
22
+
<note>
23
+
<simpara>
24
+
<function>flush</function> may not be able to override
25
+
the buffering scheme of the web server
26
+
and it has no effect on any client-side buffering in the browser.
27
+
</simpara>
28
+
</note>
29
+
<note>
30
+
<simpara>
31
+
This function does not have any effect on user level output handlers
32
+
such as those started by <function>ob_start</function>
33
+
or <function>output_add_rewrite_var</function>.
34
+
</simpara>
35
+
</note>
36
+
<warning>
37
+
<simpara>
38
+
<function>flush</function> can interfere with output handlers
39
+
that set and send headers in a web context (e.g. <function>ob_gzhandler</function>)
40
+
by sending headers before these handlers can do so.
41
+
</simpara>
42
+
</warning>
49
43
</refsect1>
50
44

51
45
<refsect1 role="parameters">
52
46