PHP disabling ouput buffering

前端 未结 2 786
独厮守ぢ
独厮守ぢ 2021-01-25 09:48

I\'ve turned off the output buffering in PHP by setting output_buffering = off in php.int but when runnng the simple code like that:



        
相关标签:
2条回答
  • 2021-01-25 10:30

    Try adding flush() and ob_flush() see at php.net

    will look something like this

    <?php
    echo "Hello ";
    ob_flush();
    flush();
    sleep(3);
    echo "World";
    ?>
    
    0 讨论(0)
  • 2021-01-25 10:34

    Ok, It seems that I've resolved the issue. The secret was setting implicit_flush to On in php config file. But that raised a question for me. In such a case what's output_buffering option for since it doesn't work as in my example?

    0 讨论(0)
提交回复
热议问题