在此处发布问题之前,我用Google搜索了几个小时,并建议我在php.ini中打开short_open_tag
和asp_tags
。我正在使用WAMP服务器并在配置php.ini后重新启动它。但仍然显示出错误。我可以帮我找到错过的东西吗?这是我在index.php中的内容。
<?php get_header(); ?>
<div class="container">
<?php get_sidebar(); ?>
<div class="span9">
<section id="download-bootstrap">
<div class="page-header">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="page-header">
<h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
</div>
<?php the_excerpt(); ?>
<?php endwhile; ?>
</section>
</div>
</div>
<?php get_footer(); ?>
答案 0 :(得分:0)
您没有关闭if
声明。
替换:
<?php endwhile; ?>
使用:
<?php
endwhile;
endif;
?>
答案 1 :(得分:0)
Put this line after <?php the_excerpt(); ?>
<?php endwhile; endif; ?>
and also close container class div.