首頁  >  文章  >  後端開發  >  CI框架 Cannot modify header information - headers already sent by

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

WBOY
WBOY原創
2016-06-06 20:25:491430瀏覽

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

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn