我有一個輸出mysql單元格數據的腳本。 「內容」單元格包含文本輸出,其長度各不相同。PHP-「頭已發送」錯誤取決於輸出長度?
當「內容」單元格的內容很小(可以說,幾行文字)時,一切正常。 但是,當輸出達到多個段落或更多時,我會收到'headers already sent'錯誤。
它取決於輸出長度嗎?我在哪裏可以閱讀更多關於它的內容我在SO上找到的答案沒有提到這種輸出長度依賴性。
44: echo "
45: <p>".$article['content']."</p>
46: ";
如果「內容」輸出的尺寸較大,腳本產生以下錯誤:
PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mantas/htdocs/asm/article.php:46) in /home/mantas/htdocs/asm/include/comments_class.php on line 56
後相關代碼 – vlcekmi3