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

search for in the

インストール/設定> <出力制御
[edit] Last updated: Fri, 07 Jun 2013

view this page in

導入

出力制御関数により、スクリプトから送信される出力を制御することが可 能になります。この機能は、複数の異なった場面、特にスクリプトがデー タ出力を開始した後にヘッダをブラウザに送信する必要がある場合に有用 です。出力制御関数は、 header() または setcookie()を使用して送信されたヘッダには作用せ ず、 echo のような関数とPHPコードのブロック間 のデータにのみ作用します。

注意:

PHP 4.1.x (および 4.2.x) から 4.3.x に更新する際、前のバージョンのバグのせいで、 php.iniimplicit_flushOFF にする必要があります。さもないと、 ob_start() を使用する全ての出力は、 出力を抑制することができなくなります。



add a note add a note User Contributed Notes 導入 - [1 notes]
up
0
Patrick
4 years ago
[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>';
}
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites