我遇到了这个错误,但我不知道应该怎么处理。
无法修改头信息 - 头已经在 /home/ben213/public_html/wp-content/themes/Bendaggers/functions.php 的第9行开始输出, 在 /home/ben213/public_html/wp-includes/pluggable.php 的第934行发生错误。
我的Functions.php文件的第9行是:
<?php if(function_exists('register_sidebar'))register_sidebar();?>
我的pluggable.php # 934出了问题
function wp_redirect($location, $status = 302) {
global $is_IIS;
$location = apply_filters('wp_redirect', $location, $status);
$status = apply_filters('wp_redirect_status', $status, $location);
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
return false;
$location = wp_sanitize_redirect($location);
if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);}
endif;
我很难弄清楚这个问题,因为我不是程序员。有什么地方出了问题吗? 请帮帮我...
pluggable.php
是什么?为什么需要它?看起来应该在functions.php
之前包含它,因为它试图设置HTTP头,而这些需要在开始输出HTML之前设置。 - Paul Grime