【问题标题】:My Codeigniter project showing header error [duplicate]我的 Codeigniter 项目显示标题错误 [重复]
【发布时间】:2015-10-22 20:57:49
【问题描述】:

我遇到了一个问题。所以请不要提及其他解决方案。到目前为止,我之前发现了很多像空白这样的解决方案

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /homepages/27/d595312696/htdocs/application/config/database.php:1)

Filename: libraries/Session.php

Line Number: 689

但我没有发现任何错误。请具体帮忙。我已经搜索了重复的问题,但还没有得到任何解决方案。 它适用于本地服务器。但是上传到在线服务器后我发现了这个问题

【问题讨论】:

    标签: php codeigniter php-5.5


    【解决方案1】:

    在向页面输出一些文本之前,您在某处调用了header()。应在任何输出之前指定所有标题。

    来自http://php.net/manual/en/function.header.php

    <html>
    <?php
    /* This will give an error. Note the output
     * above, which is before the header() call */
    header('Location: http://www.example.com/');
    exit;
    ?>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-08
      • 2016-02-18
      • 1970-01-01
      • 2021-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多