Before using Ob_flush (), make sure that the previous content is 4069 characters large enough. Some Web server output_buffering default is 4069 characters or larger, that is, the output must reach 4069 characters to flush the output buffer, in order to ensure that flush is valid
PHP tutorial Ob_flush Flush Output Cache instance and description
*/
Ob_flush ();
//
Flush ();
//
function Flush () {
Echo (Str_repeat (', 256));
Check that buffer is actually set before flushing
if (Ob_get_length ()) {
@ob_flush ();
@flush ();
@ob_end_flush ();
}
@ob_start ();
}
Str_repeat (String,repeat) repeats the string for the specified number of times.
Example Two
@apache_setenv (' No-gzip ', 1);
@ini_set (' Zlib.output_compression ', 0);
@ini_set (' Implicit_flush ', 1);
for ($i = 0; $i < Ob_get_level (); $i + +) {Ob_end_flush ();}
Ob_implicit_flush (1);
/*
Precautions for use:
The use of flush and ob_flush is particularly prone to mistakes, resulting in the inability to flush output buffers.
The correct order of flush and ob_flush should be, first ob_flush and then flush, as follows:
The following is the referenced content:
Ob_flush ();
Flush ();
If the Web server's operating system is a Windows system, then the order is reversed or not using Ob_flush () does not occur. However, the output buffer cannot be refreshed on a Linux system.
Two. Before using Ob_flush (), make sure that the previous content is 4069 characters long.
Some Web server output_buffering default is 4069 characters or larger, that is, the output must reach 4069 characters to flush the output buffer, in order to ensure that flush is valid
http://www.bkjia.com/PHPjc/445393.html www.bkjia.com true http://www.bkjia.com/PHPjc/445393.html techarticle before using Ob_flush (), make sure that the previous content is 4069 characters large enough. Some Web server output_buffering default is 4069 characters or larger, that is, the output must reach the 4069-character server ...