ob_start ([string output_callback]) - Open the output buffer
All output information is no longer sent directly to the browser, but is saved in the output buffer. An optional callback function is used to process the output result information.
ob_end_flush - End (send) the contents of the output buffer, close the output buffer
*/
ob_start(); //Open the bufferif(!function_exists('ob_clean')) //Determine whether the function is defined
echo "hello world" ; out); //Output result
//
{
function ob_clean() / /Define function{
if(@ob_end_clean())
{
return ob_start();
}
trigger_error("ob_clean() failed to delete buffer.no buffer to delete.",e_user_notice);
return false;
}
}
//
header('content-type: multipart/x-mixed -replace;boundary=endofsection'); //Send header
print "n--endofsectionn"; //Output content$pmt=array("-","","|","/ ");trueprint "content-type: text/plainnn"; //Output content
print "part $it".$pmt[$i % 4]; //Output content
print "--endofsectionn"; Output content
ob_flush(); //Send buffer data
flush(); //Refresh the output buffer
}
print "content-type: text/plainnn"; //Output content
print "the endn"; //Output content
print "--endofsection--n";
http://www.bkjia.com/PHPjc/444811.html
www.bkjia.com