• <bdo id='JGAAX'></bdo><ul id='JGAAX'></ul>

      1. <legend id='JGAAX'><style id='JGAAX'><dir id='JGAAX'><q id='JGAAX'></q></dir></style></legend>

      2. <tfoot id='JGAAX'></tfoot>
        <i id='JGAAX'><tr id='JGAAX'><dt id='JGAAX'><q id='JGAAX'><span id='JGAAX'><b id='JGAAX'><form id='JGAAX'><ins id='JGAAX'></ins><ul id='JGAAX'></ul><sub id='JGAAX'></sub></form><legend id='JGAAX'></legend><bdo id='JGAAX'><pre id='JGAAX'><center id='JGAAX'></center></pre></bdo></b><th id='JGAAX'></th></span></q></dt></tr></i><div id='JGAAX'><tfoot id='JGAAX'></tfoot><dl id='JGAAX'><fieldset id='JGAAX'></fieldset></dl></div>

        <small id='JGAAX'></small><noframes id='JGAAX'>

        PHP-“标头已发送"错误取决于输出长度?

        PHP- quot;headers already sentquot; error depending on output length?(PHP-“标头已发送错误取决于输出长度?)

          <tbody id='bcImX'></tbody>
      3. <i id='bcImX'><tr id='bcImX'><dt id='bcImX'><q id='bcImX'><span id='bcImX'><b id='bcImX'><form id='bcImX'><ins id='bcImX'></ins><ul id='bcImX'></ul><sub id='bcImX'></sub></form><legend id='bcImX'></legend><bdo id='bcImX'><pre id='bcImX'><center id='bcImX'></center></pre></bdo></b><th id='bcImX'></th></span></q></dt></tr></i><div id='bcImX'><tfoot id='bcImX'></tfoot><dl id='bcImX'><fieldset id='bcImX'></fieldset></dl></div>

            <bdo id='bcImX'></bdo><ul id='bcImX'></ul>

              <legend id='bcImX'><style id='bcImX'><dir id='bcImX'><q id='bcImX'></q></dir></style></legend>
            1. <tfoot id='bcImX'></tfoot>

                  <small id='bcImX'></small><noframes id='bcImX'>

                • 本文介绍了PHP-“标头已发送"错误取决于输出长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个输出 mysql 单元数据的脚本.内容"单元格包含长度不同的文本输出.

                  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 (lets say, a few lines of text), everything works fine. However, when the output reaches several paragraphs or more, I get the 'headers already sent' error.

                  它取决于输出长度吗?我在哪里可以阅读更多关于它的信息?我在 SO 上找到的答案没有提到这种输出长度依赖性.

                  Does it depend on the output length? Where can I read more about it? The answers I've found on SO mention nothing of such output length-dependency.

                   44:   echo "
                   45:       <p>".$article['content']."</p>
                   46:   ";
                  

                  如果内容"输出的大小很大,脚本会产生以下错误:

                  If the size of the 'content' output is large, the script produces the following error:

                  PHP 警告:无法修改标头信息 - 标头已发送通过(输出开始于/home/mantas/htdocs/asm/article.php:46)在/home/mantas/htdocs/asm/include/comments_class.php 第 56 行

                  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

                  推荐答案

                  如果你愿意,PHP 会缓冲输出.您可以使用 ob_start() 等以编程方式对此进行控制.但是,还有一个选项可以在 php.ini 中设置输出缓冲.

                  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.

                  设置 output_buffering=on 启用它,而设置 output_buffering=4096 将设置缓冲区大小限制.phpinfo() 应该告诉你这是否启用,以及缓冲区大小是多少.

                  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.

                  PHP 参考是这里

                  这篇关于PHP-“标头已发送"错误取决于输出长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                  1. <i id='zaKfJ'><tr id='zaKfJ'><dt id='zaKfJ'><q id='zaKfJ'><span id='zaKfJ'><b id='zaKfJ'><form id='zaKfJ'><ins id='zaKfJ'></ins><ul id='zaKfJ'></ul><sub id='zaKfJ'></sub></form><legend id='zaKfJ'></legend><bdo id='zaKfJ'><pre id='zaKfJ'><center id='zaKfJ'></center></pre></bdo></b><th id='zaKfJ'></th></span></q></dt></tr></i><div id='zaKfJ'><tfoot id='zaKfJ'></tfoot><dl id='zaKfJ'><fieldset id='zaKfJ'></fieldset></dl></div>
                      <bdo id='zaKfJ'></bdo><ul id='zaKfJ'></ul>
                      <legend id='zaKfJ'><style id='zaKfJ'><dir id='zaKfJ'><q id='zaKfJ'></q></dir></style></legend>

                      <small id='zaKfJ'></small><noframes id='zaKfJ'>

                        1. <tfoot id='zaKfJ'></tfoot>

                            <tbody id='zaKfJ'></tbody>