我以某种方式设法炸毁我的Wordpress网站;我最后一个文件是我的header.php,我已经梳理了几个小时并且还没有找到导致休息的原因。
任何建议:
下面的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>
更新:网上有应用程序可以运行错误测试吗?我认为它可能是某个地方缺少结束标签,但我没有发现它。我在我发现的网站上对PHP 4+进行了语法测试,看起来我很好。
答案 0 :(得分:1)
尝试打开调试功能。
http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Log
这应该可以让您了解从哪里开始。否则注释掉页面上的所有php代码。然后逐行取消注释,直到找到导致页面中断的原因。这是您的语法错误。
此外,有点不清楚blow up
是什么。它根本不起作用?或者它工作,但页面显示不正确?前一种情况是php错误,后者可能是结束标记问题。