PHP- “headers already sent” error depending on output length?

后端 未结 2 1900
情深已故
情深已故 2021-01-25 15:31

I have a script which outputs mysql cell data. The \"content\" cell contains text output, which is of varied length.

When the contents of the \"content\" cell are small

2条回答
  •  走了就别回头了
    2021-01-25 16:23

    The "headers already send" warning means, you modify the http headers somewhere in your code after you send output to the Client(i.e. with echo, whitespaces, etc..).

    This warning itself has nothing to do with the content length.

    There are more methods, wich modify the headers:

    • header / header_remove
    • session_start / session_regenerate_id
    • setcookie / setrawcookie

提交回复
热议问题