Home >Backend Development >PHP Tutorial >CI框架 Cannot modify header information - headers already sent by

CI框架 Cannot modify header information - headers already sent by

WBOY
WBOYOriginal
2016-06-06 20:25:491457browse

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /var/www/fbz/application/models/Content.php:268)

Filename: helpers/url_helper.php

貌似把前面的

<code>$logsession = $this->session->all_userdata();
</code>

这句去了也不会报错

回复内容:

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /var/www/fbz/application/models/Content.php:268)

Filename: helpers/url_helper.php

貌似把前面的

<code>$logsession = $this->session->all_userdata();
</code>

这句去了也不会报错

因为在使用session前已经有输出了
一般是因为php文件?>结尾后有空格回车
或者使用了echo或print

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn