youxu_you 发表于 2011-8-26 10:49:21

在用hook的时候 里面session_start报错

在我的类文件的第一行写上session_start都报错
A PHP Error was encountered

Severity: Warning

Message: session_start() : Cannot send session cache limiter - headers already sent (output started at F:\xampp\htdocs\ci\application\controllers\test.php:160)

Filename: hooks/myclass.php

Line Number: 1
请问 这个怎么解决呢,是hooks之前有输出吗?

jeongee 发表于 2011-8-26 11:00:24

请把你的文件设置为UTF-8无BOM格式

youxu_you 发表于 2011-8-26 14:34:51

文件都检查过了,前面没有输出啊。。。

Hex 发表于 2011-8-26 14:35:49

F:\xampp\htdocs\ci\application\controllers\test.php:160
这里说 160 行有输出。
肯定是有输出了,你检查下吧,PHP 不会乱报错的。
页: [1]
查看完整版本: 在用hook的时候 里面session_start报错