0

そのため、今日ローカルホストサーバーでワードプレスを開くと、画面上部のワードプレスツールバーのすぐ下にある白い線に「?>」があり、ウェブサイトのヘッダーの上にも表示されます...(必要ですスクリーンショットを投稿するための10担当者のポイント申し訳ありません)

何が原因で、どうすれば修正できますか?

ありがとうございました。

更新: これは私の header.php の外観です。ここにエラーは見つかりません。

<html>
<head>
<title>LoLSearch</title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css"   media="screen" />
</head>
<body>
<div id="container">
<div id="header">
    <div class="header-content"style="width:1100px; margin:0 auto;">

        <div id="logo">
            <a id="link-logo" href="http://localhost/wordpress/"></a>
        </div>
        <div id="register">
            <a class="link" href="http://localhost/wordpress/register"></a>
        </div>
        <div id="sep">
        </div>
        <div id="login">
        </div>
        <div id="sep2">
        </div>
        <div id="contact">
            <a class="link" href="http://localhost/wordpress/contact"></a>
        </div>
    </div>
</div>

私のウェブサイトのページソースは同じように見えますが、最初の行に「?>」文字があり、header.php コードにはありません。

4

2 に答える 2

0

You need to view the page source and see where that ?> is being introduced in source, and the locate it in the header.php file in your theme. The ?> is the closing string of a php function, and there is either a code error in the theme that is causing a function not to execute, or an extra and unneeded ?> that is getting dumped as text.

Deactivate all plugins and see if that makes a difference. Switch to the default WP theme for a moment and check.

Use Firebug with Firefox, or use the developer tools in Chrome or Safari or IE to examine the theme source code.

于 2014-01-20T13:59:53.760 に答える
0

これは残っている PHP タグです。サイトを localhost に移動するときにファイルを変更しましたか? タグだけでは一般的すぎて修正を提案できません。最近変更した点を教えていただけますか?

于 2014-01-20T13:58:38.567 に答える