用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1412|回复: 2
收起左侧

[URL] 地址重定向,本地测试没问题,弄到服务器上就报错了

[复制链接]
发表于 2017-7-24 17:20:07 | 显示全部楼层 |阅读模式

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/goaheadl/public_html/system/core/Exceptions.php:271)

Filename: helpers/url_helper.php

Line Number: 561

Backtrace:

File: /home/goaheadl/public_html/application/controllers/User.php
Line: 36
Function: redirect


File: /home/goaheadl/public_html/index.php
Line: 315
Function: require_once
主要是红色部分,

对应的是代码
redirect('Fengcai', 'refresh'),
为什么redirect在服务器上就不能使用了?;
请求帮助,真的很感谢!
 楼主| 发表于 2017-7-24 17:21:48 | 显示全部楼层
在本地做是没问题,弄到线上就出错了
发表于 2017-7-24 18:46:44 | 显示全部楼层
是你的代码在 redirect() 之前报错了,显示了错误信息。如果在 redirect() 函数前显示了信息,那就没法执行 redirect() 了,建议把 redirect() 先注释,然后截图看一下显示了什么信息。

本版积分规则