downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

설치/설정> <Output Control
Last updated: Fri, 24 Jul 2009

view this page in

소개

The Output Control functions allow you to control when output is sent from the script. This can be useful in several different situations, especially if you need to send headers to the browser after your script has began outputting data. The Output Control functions do not affect headers sent using header() or setcookie(), only functions such as echo() and data between blocks of PHP code.

Note: When upgrading from PHP 4.1.x (and 4.2.x) to 4.3.x due to a bug in earlier versions you must ensure that implict_flush is OFF in your php.ini, otherwise any output with ob_start() will not be hidden from output.



add a note add a note User Contributed Notes
소개
Patrick
12-Feb-2009 04:23
[In English:]
it's seem have performance impact, try this with and without bufferisation ( by output_buffering = 4096, or ob_start + ob_end_flush, it looks similar)

[En Francais:]
Ca semble avoir un fort impact sur les performances aussi, essayez ca avec et sans bufferisation ( par output_buffering = 4096, ou bien ob_start + ob_end_flush, ca semble identique)

<?php
for ($j=1; $j <= 5; $j++)  {

  list(
$usec, $sec) = explode(" ",microtime());
 
$debut[$j] = ((float)$usec + (float)$sec);

  echo
str_repeat("0123456789",5000) . '<br>' ;

  list(
$usec, $sec) = explode(" ",microtime());
 
$fin[$j] = ((float)$usec + (float)$sec);
}

for (
$j=1; $j <= 5; $j++)  {
   echo
round($fin[$j]-$debut[$j], 5) . '<br>';
}
?>

설치/설정> <Output Control
Last updated: Fri, 24 Jul 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites