Maison  >  Article  >  développement back-end  >  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:491407parcourir

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

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn