PHP Header issue with ob_start() and ob_end_flush()

前端 未结 5 1132
醉话见心
醉话见心 2020-12-21 12:56

I get header problem while I use ob_start() in the beginning of a page and ob_end_flush() at the end. Because I use header function after some quer

5条回答
  •  清酒与你
    2020-12-21 13:38

    I think the problem may be that you are trying to change the headers, after you have already sent something else to the output. Even when using buffering, I don't think this is possible. I think you need to call ob_end_clean() to discard the current buffer and write header information.

提交回复
热议问题