0

インデックスファイルをデバッグし、コードを除外しました。次のコードを使用すると、サイトから「予期しないファイルの終わり」エラーが返されることがわかりました。削除すると、エラーなしでサイトが表示されます。したがって、構文コードが欠落しているかどうか、またはタイプミスがあるかどうかはわかりません。

 <?php

 // The Query
 query_posts( 'cat=9614&posts_per_page=5&tag=review' );

 // The Loop
 while ( have_posts() ) : the_post();
 ?>
 <li>
 <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
 </li>
 <?
 endwhile;

 // Reset Query
 wp_reset_query();

 ?>
4

1 に答える 1

6

<?phpの代わりに使用<?

<?php

 // The Query
 query_posts( 'cat=9614&posts_per_page=5&tag=review' );

 // The Loop
 while ( have_posts() ) : the_post();
 ?>
 <li>
 <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
 </li>
 <?php // error is here
 endwhile;

 // Reset Query
 wp_reset_query();

 ?>
于 2013-02-08T04:22:27.687 に答える