[php] question about ob_end_flush

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

I am comfused about the function ob_end_flush.In the manual:This function
will send the contents of the topmost output buffer (if any) and turn this
output buffer off.

i have made such tests.

<?php
    ob_start();
    echo "hello word!";
    ob_end_flush();
?>
this works alright.the script output "hello world!".

<?php
    ob_start();
    echo "hello word!";
    ob_end_flush();
   ob_clean();
?>
this script output nothing.i don't know why this heppan.why the ob_clean
function can affect the output?ob_end_flush has send the content( in this
case it is "hello word!") and turn off the buffer!

thanks.
Jason

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux