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

后端 未结 2 853
后悔当初
后悔当初 2021-01-25 15:58

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:26

    PHP will buffer output if you want it to. You can control this programmatically with ob_start(), etc. However, there is a further option to set output buffering on in php.ini.

    Setting output_buffering=on enables it, while setting output_buffering=4096 will set a limit to the buffer size. phpinfo() should tell you if this is enabled, and what the buffer size is.

    The PHP reference is here

提交回复
热议问题