ob_get_level() starts at level 1

前端 未结 1 598
鱼传尺愫
鱼传尺愫 2021-01-18 05:41

Having a few problems with output buffering. Mainly, I\'m trying to run output buffering with the ob_gzhandler callback, but it keeps telling me its using an unsupported com

相关标签:
1条回答
  • 2021-01-18 06:18

    You have output buffering enabled by default (see the docs) - that basically means that every PHP script starts with ob_start().

    If you want to disable the default OB for all PHP scripts, in your php.ini, set output_buffering = Off.

    If you only want to disable the default OB for this specific script, use the while loop - it's quite correct.

    As for the ob_clean - are you sure you want to delete the output that's in your buffer? IMO it's not really necessary, unless you are seeing significant slow page loads. Don't worry about optimizing that (at least not now).

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