警告:无法打开流并且无法修改标头

时间:2014-12-06 01:09:56

标签: php css wordpress

网站www.bethazore.com在尝试登录管理员时出现了一些错误消息

  

警告:file_put_contents(/home/content/37/10812537/html/wp-content/themes/novelty/custom-style.css)[function.file-put-contents]:无法打开流:权限被拒绝第66行/home/content/37/10812537/html/wp-content/themes/novelty/functions.php

     

警告:无法修改标题信息 - 已在/ home / content / 37中发送的标题(输出从/home/content/37/10812537/html/wp-content/themes/novelty/functions.php:66开始) /10812537/html/wp-includes/pluggable.php在875行。

我在这里得到了一些帮助。我不确定如何解决它,这对我来说有点太复杂了,但这就是他们所说的Warning: Cannot modify header information - headers already sent by ERROR - 任何人都可以帮忙吗?

1 个答案:

答案 0 :(得分:2)

让我们逐字分析这个错误:

file_put_contents(/home/content/37/10812537/html/wp-content/themes/novelty/custom-style.css)

是的,我们正在运行file_put_contents,并且正在访问该文件。

failed to open stream: Permission denied

但是不允许对该文件执行它想做的事情,该文件是为该函数编写的。

in /home/content/37/10812537/html/wp-content/themes/novelty/functions.php on line 66

这就是它被召唤的地方。

因此,您现在知道错误的生成位置,导致错误的原因以及尝试执行的操作。问题当然是Apache没有权限覆盖该文件。

在控制台中运行以下命令:

chmod 777 /home/content/37/10812537/html/wp-content/themes/novelty/custom-style.css

或者在控制面板中将其设置为模式777,您应该没问题。