mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-29 04:52:50 +08:00
41 lines
2.5 KiB
HTML
41 lines
2.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>刷新输出缓冲</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.flush" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">flush</h1>
|
||
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">flush</span> — <span class="dc-title">刷新输出缓冲</span></p>
|
||
|
||
</div>
|
||
<div class="refsect1 unknown-seealsp" id="refsect1-function.flush-unknown-seealsp">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>flush</strong></span>
|
||
( <span class="methodparam">void</span>
|
||
) : <span class="type"><span class="type void">void</span></span></div>
|
||
|
||
<p class="simpara">
|
||
刷新PHP程序的缓冲,而不论PHP执行在何种情况下(CGI ,web服务器等等)。该函数将当前为止程序的所有输出发送到用户的浏览器。
|
||
</p>
|
||
<p class="para">
|
||
<span class="function"><strong>flush()</strong></span> 函数不会对服务器或客户端浏览器的缓存模式产生影响。因此,必须同时使用 <span class="function"><a href="ob_flush.html" class="function">ob_flush()</a></span> 和<span class="function"><strong>flush()</strong></span> 函数来刷新输出缓冲。
|
||
</p>
|
||
<p class="para">
|
||
个别web服务器程序,特别是Win32下的web服务器程序,在发送结果到浏览器之前,仍然会缓存脚本的输出,直到程序结束为止。
|
||
</p>
|
||
<p class="para">
|
||
有些Apache的模块,比如mod_gzip,可能自己进行输出缓存,这将导致<span class="function"><strong>flush()</strong></span>函数产生的结果不会立即被发送到客户端浏览器。
|
||
</p>
|
||
<p class="para">
|
||
甚至浏览器也会在显示之前,缓存接收到的内容。例如 Netscape 浏览器会在接受到换行或 html 标记的开头之前缓存内容,并且在接受到 </table> 标记之前,不会显示出整个表格。
|
||
</p>
|
||
<p class="para">
|
||
一些版本的 Microsoft Internet Explorer 只有当接受到的256个字节以后才开始显示该页面,所以必须发送一些额外的空格来让这些浏览器显示页面内容。
|
||
</p>
|
||
</div>
|
||
|
||
</div></div></div></body></html> |