Codeigniter - 无法修改标头信息 - 已发送的标头

问题描述:

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/aphotel/public_html/application/config/config.php:1)

Filename: libraries/Session.php

Line Number: 366





它的奇怪部分,libraries文件夹中没有session.php文件

#

Weird part of it, there is no session.php file in libraries folder

我之前遇到过这个问题,它是由output_buffering关闭引起的。

I had this problem before and it was caused by output_buffering was Off.

php.ini并搜索output_buffering并使其看起来像这样

Edit your php.ini and search for output_buffering and make it looks like this

output_buffering = On