-2

我正在尝试在本地主机上修改 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 } 

?> 
4

1 回答 1

-1

如评论中所述,您缺少一个或多个右括号。

我建议您else-if在使用 HTML 时使用另一种执行语句的方式来避免这样的错误:

<?php if($this->countModules('social')):?>
    <!-- your HTML -->
<?php elseif($this->countModules('anotherInput')):?>
    <!-- your HTML -->
<?php endif; ?>

也适用于forandforeach语句。

于 2013-10-30T15:51:37.447 回答