站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Answers-Troubleshooting
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
==已经发送了标头== '''Description:''' You get a warning message on your browser that says: '''描述:'''你在浏览器上得到一条警告信息,显示: <tt>Warning: Cannot modify header information - headers already sent by (output started at</tt> <tt>警告: 不能够更改标头信息- 标头已经发送 (output started at</tt> '''Reason and Solution :''' '''原因和解决方法 :''' It is usually because there are spaces, new lines, or other garbage before an opening '''<tt><?php</tt>''' tag or after a closing '''<tt>?></tt>''' tag, typically in '''wp-config.php'''. This could be true about some other file too, so please check the error message, as it will list the specific file name where the error occurred (see "Interpreting the Error Message" below). Replacing the faulty file with one from your most recent backup or one from a fresh WordPress download is your best bet, but if neither of those are an option, please follow the steps below. 通常因为在开放的'''<tt><?php</tt>'''标签或者关闭的'''<tt>?></tt>''' tag标签后面,特别是在'''wp-config.php'''中,有空格,新行,和其它无用标记。其它文件也会出现这样的情况,因此请查看错误信息,上面会列出出现错误的文件名称(请看看下面的"解释错误信息")。使用你最近更新的备份中的文件取代有问题的文件,或者用你最新下载的WordPress文件取消有文件的问题,都是最好的方法。但是如果这两种方法都行不通,请遵循下面的步骤。 Just because you cannot see anything does not mean that PHP sees the same. 你看不到任何内容并不能够代表PHP也不能够看到任何内容。 # Download the file mentioned in the error message. #下载错误信息中提到的文件。 # Open that file in a [[WordPress:Glossary#Text editor|plain text editor]] ('''NOT''' MS Word or similar. Notepad or BBEdit are fine). #在一个[[WordPress:Glossary#Text editor|纯文本编辑器]]中打开文件('''不是'''MS Word或者类似的。Notepad 或者 BBEdit也行)。 # Check that the ''very'' first characters are '''<tt><?php</tt>''' #核实''最先''字符是'''<tt><?php</tt>''' # Check that the ''very'' last characters are '''<tt>?></tt>''' #核实''最后''的字符是'''<tt>?></tt>''' To be sure about the end of the file, do this: 确定结束文件,请操作: #Place the cursor between the ? and > #在?和 >之间放上鼠标 #Now press the DELETE key on your computer #现在按住你的电脑上的DELETE键 #*Note to MAC users: The "DELETE" key on a PC deletes characters to the ''right'' of the cursor. That's the key meant here. #*MAC用户注意:个人电脑上的"DELETE"键删除了鼠标''右边的''字符。那是这里提到的键。 #Keep that key pressed #安装那个键 #For at least 15 seconds #至少按15秒 #Now type > and #现在输入>并且 #'''save''' without pressing any other key at all. #不要输入其它键,'''保存'''。 #If you press another key, you will bring the problem back. #如果你按了其它键,你将会又遇到麻烦。 '''Interpreting the Error Message:''' '''解释错误信息:''' If the error message states: <code>Warning: Cannot modify header information - headers already sent by (output started at /path/blog/wp-config.php:34) in /path/blog/wp-login.php on line 42</code>, then the problem is at line #34 of <code>wp-config.php</code>, not line #42 of <code>wp-login.php</code>. In this scenario, line #42 of <code>wp-login.php</code> is the victim. It is being affected by the excess whitespace at line #34 of <code>wp-config.php</code>. 如果错误信息显示:<code>警告:不能更改标头信息-在第42行/path/blog/wp-login.php,标头已经发送(从/path/blog/wp-config.php:34开始输出),然后问题出现在<code>wp-config.php</code>的第#34行,而不是<code>wp-login.php</code>的第#42行。在这里,<code>wp-login.php</code>的第#42行是问题所在。受到<code>wp-config.php</code>的第#34行的的过度的空格的影响。 If the error message states: <code>Warning: Cannot modify header information - headers already sent by (output started at /path/wp-admin/admin-header.php:8) in /path/wp-admin/post.php on line 569</code>, then the problem is at line #8 of <code>admin-header.php</code>, not line #569 of <code>post.php</code>. In this scenario, line #569 of <code>post.php</code> is the victim. It is being affected by the excess whitespace at line #8 of <code>admin-header.php</code>. 如果错误信息显示:<code>警告:不能更改标头信息-在第42行/path/blog/wp-login.php,标头已经发送(从/path/wp-admin/admin-header.php:8开始输出)在/path/wp-admin/post.php on line 569</code>中,然后问题出现在<code>admin-header.php</code>的第#8行,而不是<code>post.php</code>的第#569行。在这里,<code>post.php</code>的第#569行是问题所在。受到<code>admin-header.php</code>的第#8行的的过多的空格的影响。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)