How do headers work with output buffering in PHP?

后端 未结 1 1046
无人及你
无人及你 2020-12-10 04:18

Title is self-explanatory.

I have a good bit of experience with PHP, but I am not sure how the header function works between ob_start() and

相关标签:
1条回答
  • 2020-12-10 05:14

    The header() does indeed ignore output buffering. Part of the reason to use output buffering is so you can send HTTP headers "out of order" since the response is buffered. You can't send HTTP headers once you've sent any kind of output (unless that output is buffered).

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