How can I redirect in PHP without header errors?

前端 未结 7 2121
旧时难觅i
旧时难觅i 2021-02-10 08:04

How can I redirect in PHP with this setup below without getting header output errors, I understand that nothing can be printed to the browser before a header is set, I am lookin

7条回答
  •  暖寄归人
    2021-02-10 08:22

    Use ob_start() in the first line even befor the include. so you can set headers anytime.

提交回复
热议问题