我正在尝试在我的本地主机上修改joomla网站,在更改配置文件中的详细信息后,我收到以下错误。
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\joomla\templates\skm\index.php on line 1003
第1003行是以下代码的最后一行
<?php
$spotlight = array ('social');
$botsl = jaTpl_calSpotlight ($spotlight,jaTpl_isOP()?100:99.5);
if( $botsl ) {
?>
<!-- BOTTOM SPOTLIGHT-->
<div id="botsl1" class="wrap">
<div class="main clearfix">
<div class="main-inner1 clearfix">
<?php if( $this->countModules('social') ) {?>
<div class="ja-box ja-box<?php echo $botsl['social']['class']; ?>" style="width: <?php echo $botsl['social']['width']; ?>;">
<jdoc:include type="modules" name="social" style="xhtml" />
</div>
<?php } ?>
</div>
</div>
</div>
<!-- //BOTTOM SPOTLIGHT -->
<?php } ?>
<div id="footer1" class="wrap1">
<div class="main clearfix">
<jdoc:include type="modules" name="footer1" style="xhtml" />
<!-- <jdoc:include type="modules" name="footer" style="xhtml" /> -->
</div>
</div>
<jdoc:include type="modules" name="debug" />
</div>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/js/wall.js"></script>
</body>
<script>
/* var ifr='<?php echo JRequest::getVar('ifr'); ?>';
var last_clicked;
window.onclick = function(e) {
last_clicked = e.target;
if (last_clicked.href) {
var new_url = last_clicked.href+"&ifr=true";
// alert(new_url);
e.preventDefault();
window.location = new_url;
last_clicked = '';
}
} */
</script>
</html>
<?php }
?>
答案 0 :(得分:-1)
如评论中所述,您缺少一个或多个右括号。
我建议您使用另一种方法来执行else-if
语句,以避免像这样使用HTML时出现这样的错误:
<?php if($this->countModules('social')):?>
<!-- your HTML -->
<?php elseif($this->countModules('anotherInput')):?>
<!-- your HTML -->
<?php endif; ?>
也适用于for
和foreach
语句。