2012-03-26 39 views
0

我以某種方式設法打擊我的Wordpress網站;我所在的最後一個文件是我的header.php,我已經梳理了幾個小時,並且還沒有找到導致中斷的原因。header.php中的錯誤打破了我的WP網站?

任何建議:

的header.php以下:

<?php 
/** 
* @package WordPress 
* @subpackage Default_Theme 
*/ 
?> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?> > 
<head> 
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"/> 
<meta property="fb:admins" content="1641586359" /> 

<title> 
<?php 
    if($pagePtr =="home"){ 
     print"Read It Forward"; 
    }else if(is_search()){ 
     echo the_search_query(); print" - Read It Forward Search Results";  
    }else{ 
     wp_title('', true, 'left'); 
    } ?> 
<?php //bloginfo('name'); ?> 
</title> 

<meta name="description" content="Sneak peeks at great reads, behind-the-scenes insights from authors, lively & provocative reader's guides & fabulous free books." /> 
<link type="text/css" href="<?php bloginfo('template_directory'); ?>/style.css" rel="stylesheet" /> 
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/rif_icon.gif" /> 
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" /> 
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" /> 
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> 

<?php if (is_single()) { ?> 
    <meta property="og:title" content="<?php single_post_title(''); ?>" /> 
    <meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" /> 
    <meta property="og:type" content="article" /> 
    <meta property="og:image" content="<?php 
     if($image= get_post_meta($post->ID, "image", true)) { echo $image; } 
     else if($isbn= get_post_meta($post->ID, "isbn", true)) { ?>http://www.randomhouse.com/images/dyn/cover/?source=<?php echo $isbn; ?>&height=225&maxwidth=150<?php } 
     else { ?> 
     http://www.crownpublishing.com/images/readitforward/rif_square.jpg 
     <?php }?>" /> 
     <?php } ?> 

<link href="<?php bloginfo('template_directory'); ?>/tweet/tweet.css" media="all" rel="stylesheet" type="text/css"/> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 

<script type="text/javascript" src="http://www.crownpublishing.com/js/jquery.hoverIntent.minified.js"></script> 

<script language="javascript" src="<?php bloginfo('template_directory'); ?>/tweet/jquery.tweet.js" type="text/javascript"></script> 
<script type="text/javascript" language="javascript" src="http://www.randomhouse.com/js/emv.js"></script> 

<script language="javascript" src="<?php bloginfo('template_directory'); ?>/includes/RIFvalid.js" type="text/javascript"></script> 


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script> 


<!--[if IE]> 
<style> 
.searchfield { 
position:relative; 
top:-1px; 
} 
</style> 
<![endif]--> 


</head> 

<body> 

<div id="BGcontainer"> 
     <div id="container"> 
     <div align="center" style="width:100%; background:#FFF;"><a href="http://www.facebook.com/ReadItForward"><img src="<?php bloginfo('template_directory'); ?>/images/readitforward_ad.jpg" style="max-width:700px; border: 15px solid white"/></a></div> 

     <div id="header">   
      <div id="title"> 
       <a href="<?php bloginfo('url'); ?>"><img src="http://www.osmproduction.com/RIF/wp-content/uploads/2012/02/NewRIF_logo.gif" border="0" alt="Read It Forward"></a><br /> 
       <p>Sneak peeks at great reads, behind-the-scenes insights from authors, lively and provocative reader's guides, and fabulous free books</p> 
       <div class="clear"></div>    
       </div> 

        <div id="Hsocial">    
        <div id="Hscontainer">     
        <div class="clear"></div> 
        <a class="SCRIBDbutton buttonHover" href="http://www.scribd.com/document_collections/2697109"></a> 
        <a class="GRbutton buttonHover" href="http://www.goodreads.com/user/show/3313709"></a> 
        <a class="FBbutton buttonHover" href="http://www.facebook.com/ReadItForward"></a> 
        <a class="TWbutton buttonHover" href="http://twitter.com/readitforward"></a> 
        <a class="YTbutton buttonHover" href="http://www.youtube.com/user/crownbooks#g/c/CBA6E62882B7B93F"></a> 
        <a class="RSSbutton buttonHover" href="<?php bloginfo('rss2_url'); ?>"></a>      
        <div class="clear"></div> 


<?php 
if(function_exists('FA_display_slider')){ 
    FA_display_slider(64); 
} 
?> 


      </div> 
      </div> 

      <div id="searchBox">    
      <?php get_search_form(); ?> 
      </div> 


       <?php //MENU: http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/ ?> 
       <?php //SLIDEIN tab: http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/ ?> 
      </div>   
      </div> 

      <div align="center"> 
      <ul id="nav" align="center"> 
       <li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-2/" class="navLink">FREE BOOKS</a></p></li> 
       <li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-3/" class="navLink">READER REVIEWS</a></p></li> 
       <li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-4/" class="navLink">MEET THE AUTHOR</a></p></li> 
       <li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-5/" class="navLink">MEET THE EDITOR</a></p></li> 
       <li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-6/" class="navLink">BOOK GROUPS</a></p></li> 
       <li class="navItem"><p class="navInfo"><a href="http://www.osmproduction.com/RIF/sample-page-7/" class="navLink">FAVORITES</a></p></li> 
       <li class="navItemLast navMenu"> 
        <p class="navInfo"><a href="" class="navLink">ALL CATEGORIES</a></p> 
        <div align="left"> 
        <ul class="subNavMenu"> 
         <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page/">Book Groups</a></div></li> 
         <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-2/">Critics Rave</a></div></li>     
         <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-3/">Enthusiasms</a></div></li>     
         <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-4/">Free Books</a></div></li> 
         <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-5/">Gift Guide</a></div></li>      <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-2/">Living with Books</a></div></li> 
         <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-6/">Meet the Author</a></div></li> 
         <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-7/">Meet the Editor</a></div></li> 
         <li><div class="subNavItem"><a href="http://www.osmproduction.com/RIF/sample-page-8/">Reader Reviews</a></div></li> 

         <?php //wp_list_categories('orderby=name&include=3343'); ?> 

        </ul> 
        </div>  
       </li> 
       <?php /* 
       <li class="navItemLast navMenu"><p class="navInfo"><a href="" class="navLink">RECENT ISSUES</a></p> 
        <ul class="subNavMenu">      
         <li>Test 1</li> 
         <li>Test 2</li> 
         <li>Test 3</li> 
        </ul>      
       </li> 
       */?> 
       <?php //MENU: http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/ ?> 
       <?php //SLIDEIN tab: http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/ ?> 
      </ul> 
      </div>  
     </div> 
<script> 
$('.navItem').click(function() { 
    var newLink = $('a:first-child',this).attr("href"); 
    if(newLink != "" && newLink != "#") { 
    window.location =newLink; 
    } 
    return false; 
}); 
</script> 


<script> 
$('.navItem').click(function() { 
    var newLink = $('a:first-child',this).attr("href"); 
    if(newLink != "" && newLink != "#") { 
    window.location =newLink; 
    } 
    return false; 
}); 
</script> 

UPDATE:是否有一個應用程序在網上的任何地方運行錯誤檢查?我認爲這可能是一個失蹤的結束標記,儘管我沒有發現它。我在一個我發現的網站上運行了針對PHP 4+的語法測試,並且在那裏似乎沒有問題。

+0

除了它壞了以外的錯誤是什麼? – Ronnie 2012-03-26 19:49:52

+0

什麼是錯誤? – 2012-03-26 19:50:10

+0

使用源代碼管理。 https://github.com/ – dqhendricks 2012-03-26 19:52:25

回答

1

嘗試開啓調試。

http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log

這應該給你從哪裏開始的想法。否則註釋掉頁面上的所有php代碼。然後逐行取消註釋,直到找出導致頁面中斷的原因。這是你的語法錯誤的地方。

此外,blow up是什麼有點不清楚。它根本不起作用?或者它有效,但頁面顯示不正確?前一種情況將是一個PHP錯誤,後者可能是一個結束標籤問題。