帮助中心 >  技术知识库 >  虚拟主机 >  虚拟主机常见问题及技术支持 >  WordPress 警告Warning:Cannot modify header information – headers already sent by

WordPress 警告Warning:Cannot modify header information – headers already sent by

2017-02-27 22:23:29 4186

WordPress 警告Warning:Cannot modify header information – headers already sent by


问题描述:

  在升级WordPress 到新的版本或者是全新安装之后,在浏览器里遇到这样的错误:Warning:Cannot modify header information – headers already sent by (output started at /path/blog/wp-config.php:34)

  解决办法:删掉 wp-config.php 里面多余的空格,空行以及其他无用信息。

  1. 通过 FTP 下载 wp-config.php 文件

  2. 打开 wp-cinfig.php

  3. 去除<?php 前面的所有空格。

  4. 确保第一个字段是 <?php 并且 <?php 在第一行而且中间没有空格。

WordPress博客程序常见错误的解决方法

  5.去除 ?> 后的所有空格。

  6. 确保最后的字符是 ?>,放到最后一行,确保中间没有空格。

WordPress博客程序常见错误的解决方法

  这个错误可以发生在其他的文件。仔细阅读错误信息,上面有记录出错的文件的位置的。


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: