wide288 发表于 2013-2-23 13:46:28

控制器跳转报错

在控制器中使用
redirect('class/method');

报错误:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\application\controllers\class.php:1)

Filename: helpers/url_helper.php

Line Number: 542

这怎么解决呢?

CloudMind 发表于 2013-2-23 17:52:08

有可能是没有加载url辅助函数,在autoload.php中修改$autoload['helper'] = array('url');试试

wide288 发表于 2013-2-23 20:32:15

CloudMind 发表于 2013-2-23 17:52 static/image/common/back.gif
有可能是没有加载url辅助函数,在autoload.php中修改$autoload['helper'] = array('url');试试 ...

在此类中还真加了。$this->load->helper('url');

wide288 发表于 2013-2-23 20:49:24

已经解决,等下写出来

wide288 发表于 2013-2-23 20:52:33

http://blog.csdn.net/wide288/article/details/8605925
页: [1]
查看完整版本: 控制器跳转报错