2014-01-20 27 views
0

所以,當我今天在我的localhost服務器上打開wordpress時,屏幕頂部的白線上出現一個「?>」,就在wordpress工具欄下方,它也顯示在我的網站上方標題...(我需要10個重點發布屏幕截圖對不起)WordPress的白線溢出

是什麼原因造成的,我該如何解決它?

謝謝。

更新: 這是我的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中碼

+0

取消所有插件,看看是否有所作爲。暫時切換到默認的WP主題並檢查。 – markratledge

+0

我嘗試將主題更改爲twentyThreshold,並且錯誤消失,所以它可能是我的文件中的錯誤... – Novakim

回答

0

這是在PHP標籤的左側可以找到。將網站移至本地主機時是否修改了任何文件?這個標籤太籠統了,不能提供修復,所以你能告訴我你最近變了什麼嗎?

+0

我回滾到我的主題的早期版本,它解決了問題 – Novakim

0

您需要查看頁面源代碼並查看?>在源代碼中的位置,並將其定位到主題中的header.php文件中。 ?>php函數的結尾字符串,並且主題中存在導致函數不執行的代碼錯誤,或者以文本形式轉儲的額外和不需要的?>

關閉所有插件,看看是否有所作爲。暫時切換到默認的WP主題並檢查。

使用Firebug與Firefox,或使用開發人員工具ChromeSafariIE來檢查主題源代碼。

+0

我回滾到我的主題的早期版本並解決了這個問題 – Novakim