解决wordpress使用wp_redirect函数出现Warning: Cannot modify header information的方法
2016-09-11 09:38
771 查看
php中使用重定向跳转时,“Warning: Cannot modify header information – headers already sent by (output started at…”是常见的错误提醒,出现该错误的原因是跳转函数前有包括回车、空格、换行的输出,解决方法是使用ob_start()函数打开缓冲区,使用跳转前 的输入进入缓冲区而不会立即输出,避免这个错误提醒。近两天博客吧制作的wordpress主题中出现该提示,解决方法是在主题 functions.php文件中使用ob_start()函数。 在出现该错误的主题functions.php文件添加代码:
|
相关文章推荐
- wordpress在登录后台出现“Warning: Cannot modify header information - headers already sent by”的解决方法
- 解决Wordpress安装时出现Warning: Cannot modify header information
- 当用header方法输出内容时出现“Cannot modify header information - headers already sent by”的解决方法
- PHP错误Warning: Cannot modify header information - headers already sent by解决方法
- 安装wordpress出现:Warning: Cannot modify header information - headers already sent (output started at...)错误解决方案
- "Warning: Cannot modify header information”的解决方法!
- php出现Cannot modify header information问题的解决方法大全
- PHP错误Warning: Cannot modify header information - headers already sent by解决方法
- 关于 Wordpress安装时出现“Warning: Cannot modify header information – headers already sent by….”
- PHP出现Cannot modify header information问题的解决方法
- php出现Cannot modify header information问题的解决方法
- 错误信息:Warning Cannot modify header information - headers already sent by 的解决方法fi
- php解决乱码问题时,出现Cannot modify header information问题的解决方法
- PHP错误Warning: Cannot modify header information - headers already sent by解决方法
- PHP错误Warning: Cannot modify header information - headers already sent by解决方法
- php出现Cannot modify header information问题的解决方法大全
- php出现Cannot modify header information问题的解决方法大全
- 当用header方法输出内容时出现“Cannot modify header information - headers already sent by”的解决方法
- php出现Cannot modify header information问题的解决方法大全
- php出现Cannot modify header information问题的解决方法大全