What does this mean? “Notice: ob_flush() [ref.outc

2019-08-08 17:10发布

问题:

I got this error after running the following function:

function send_buffer(){
  ob_end_flush(); 
  ob_flush(); 
  flush(); 
  ob_start();
}

The main body of my website takes a few seconds to load, so I want to send the header first. But I got the following error: Notice: ob_flush() [ref.outcontrol]: failed to flush buffer zlib output compression

回答1:

You can't use gzip/zlib compression as well as flush.

Pick one or the other. I'd recommend gzip rather than flush.



标签: php buffer