Calling ob_flush() and flush(), yet browser doesn't show any output until script finishes

后端 未结 12 2810
离开以前
离开以前 2020-12-07 00:55

Hi Please View Below Code :

\\n\";
for( $i = 0 ; $i < 10 ; $i++ )
{
    echo \"$i
\\n\";
12条回答
  •  粉色の甜心
    2020-12-07 01:10

    It is correct. Works fine for me from CLI running PHP 5.3.3. If it's not working for you, your PHP install may have output buffering disabled.

    I would also suggest putting ob_end_flush() at the end of your script to close the output buffer.

提交回复
热议问题