【发布时间】:2015-11-16 11:44:51
【问题描述】:
我正在构建自己的 wordpress 主题。我对 html 和页面相关的东西并不陌生,但从未为 php 编写代码行。我想继续使用更复杂的 cms - wordpress。现在我不明白为什么,但我的页面由于某种原因抛出了解析错误。
解析错误:语法错误,意外 ... 在 ## 行
这是我的部分代码,包括 php 中的 html:
<?php
if (have_posts()) :
while (have_posts()) : the_post();
<h2>Title here</h2> /* says error is on this line */
endwhile;
else :
echo '<p>No content found</p>'
endif; /* also error is on this line */
?>
我正在使用 Dreamweaver,但我猜这不是解决此问题的关键。
【问题讨论】:
标签: php html wordpress parse-error