Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取解析错误:语法错误,PHP中意外的$end_Php_Mysql_Joomla - Fatal编程技术网

获取解析错误:语法错误,PHP中意外的$end

获取解析错误:语法错误,PHP中意外的$end,php,mysql,joomla,Php,Mysql,Joomla,我得到以下错误: Parse error: syntax error, unexpected $end in /var/www/html/joomla/components/com_jtagmembersdirectory/views/memberdetails/tmpl/default.php on line 147 可能的解决方案是什么,我搜索了许多帖子,我确实使用了 没有开始和结束括号问题,也没有报价问题 是否还有其他可能导致此问题的原因 我的代码如下所示 <?php

我得到以下错误:

 Parse error: syntax error,
 unexpected $end in /var/www/html/joomla/components/com_jtagmembersdirectory/views/memberdetails/tmpl/default.php 
on line 147
可能的解决方案是什么,我搜索了许多帖子,我确实使用了
没有开始和结束括号问题,也没有报价问题

是否还有其他可能导致此问题的原因

我的代码如下所示

  <?php

defined('_JEXEC') or die('Restricted access');

    $user =& JFactory::getUser();
    $this->user_id = $user->id;
?>

<div class="Jtag_Members_Directory_details">
    <h2 class="page-title"><?php echo JText:: _('JTAG_MEMBER_DETAIL');?></h2>
    <div id="jtag-member-list">

          <img width="225" src="components/com_jtagmembersdirectory/assets/profile_pictures/small/<?php echo $this->profile->profile_picture ? $this->profile->profile_picture : 'profile2.jpg' ?>" alt="" />
          <div class="info details">


            <?php if ($this->profile->user_id == $this->user_id && $this->profile->allow_edit):?>
                <a href="<?php echo JRoute::_('index.php?option=com_jtagmembersdirectory&task=editmemberdetails&mid='.$user->id) ?>" title ="Click to edit your Profile"><h2><?php echo $this->profile->name ?></h2></a>
            <?php else:?>
                <h2><?php echo $this->profile->name ?></h2>    
            <?php endif; ?>



            <h4><?php echo JText:: _('JTAG_MEMBER_DETAIL_ABOUT_ME');?></h4>
            <div><?php echo nl2br($this->profile->member_profile) ?></div>
            <ul class="member-details">

            <?php if($this->user_id !=0):?>
                <?php if($this->profile->hasGallery==1 && $this->profile->display_gallery == 1):?>      
                    <li><a href="<?php echo JRoute::_('index.php?option=com_jtagmembersdirectory&task=showgallery&mid='.$this->profile->user_id) ?>" title ="Click to checkout the gallery"><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_GALLERY');?></strong></a></li>                    
                <?php endif;?>
            <?php endif;?>  

            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_country==1 && $this->profile->country):?>
                <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_COUNTRY');?></strong> <?php echo $this->countries[$this->profile->country]; ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->country):?>
                <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_COUNTRY');?></strong> <?php echo $this->countries[$this->profile->country]; ?></li>
              <?php endif;?>
            <?php endif;?>  


            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_city==1 && $this->profile->city):?>
                <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_CITY');?></strong> <?php echo $this->profile->city; ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->city && $this->profile->display_city):?>
                <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_CITY');?></strong> <?php echo $this->profile->city; ?></li>
              <?php endif;?>
            <?php endif;?>  


            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_state==1 && $this->profile->state):?>
                          <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_STATE');?></strong> <?php echo $this->profile->state; ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->state ):?>
                          <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_STATE');?></strong> <?php echo $this->profile->state; ?></li>
              <?php endif;?>
            <?php endif;?>  




            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_phone_no==1 && $this->profile->phone_no):?>
                          <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_PHONE_NO');?></strong> <?php echo $this->profile->phone_no ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->phone_no  && $this->profile->display_phone_no):?>
                          <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_PHONE_NO');?></strong> <?php echo $this->profile->phone_no ?></li>
              <?php endif;?>
            <?php endif;?>  

            <?php if($this->user_id==0):?>
              <?php if($this->profile->display_nr_email==1 && $this->profile->Email):?>
               <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_EMAIL');?></strong> <?php echo $this->profile->Email; ?></li>
              <?php endif;?>
            <?php else:?>
              <?php if( $this->profile->Email):?>
               <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_EMAIL');?></strong> <?php echo $this->profile->Email; ?></li>
              <?php endif;?>
            <?php endif;?>  



          <?php if($this->user_id==0):?>
            <?php if($this->profile->display_nr_facebook==1 && $this->profile->facebook_page):?>
             <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_FACEBOOK_PAGE');?></strong> <a href="http://<?php echo $this->profile->facebook_page ?>" target="_blank"><?php echo $this->profile->facebook_page ?></a></li>

            <?php endif;?>
          <?php else:?>
            <?php if( $this->profile->facebook_page && $this->profile->display_facebook_page):?>
             <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_FACEBOOK_PAGE');?></strong> <a href="http://<?php echo $this->profile->facebook_page ?>" target="_blank"><?php echo $this->profile->facebook_page ?></a></li>

            <?php endif;?>
          <?php endif;?>  



          <?php if($this->user_id==0):?>
            <?php if($this->profile->display_nr_twitter==1 && $this->profile->twitter_page):?>
             <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_TWITTER_PAGE');?></strong> <a href="http://<?php echo $this->profile->twitter_page ?>" target="_blank"><?php echo $this->profile->twitter_page ?></a></li>

            <?php endif;?>
          <?php else:?>
            <?php if( $this->profile->twitter_page && $this->profile->display_twitter_page):?>
             <li><strong><?php echo JText:: _('JTAG_MEMBER_DETAIL_TWITTER_PAGE');?></strong> <a href="http://<?php echo $this->profile->twitter_page ?>" target="_blank"><?php echo $this->profile->twitter_page ?></a></li>

            <?php endif;?>
          <?php endif;?>  

          <?php if($this->user_id):?>   
              <?php foreach ($this->profile->custom_fields as $field):  ?>
                <?php if ($field->field_label && $field->field_value): ?>
                <li><strong><?php echo $field->field_label; ?>:</strong> <?php echo $field->field_value ?></li>
                <?php endif; ?>
              <?php endforeach; ?>
          <?php else: ?>
              <?php foreach ($this->profile->custom_fields as $field):  ?>
                <?php if ($field->field_label && $field->field_value && $field->display_nr_cf): ?>
                <li><strong><?php echo $field->field_label; ?>:</strong> <?php echo $field->field_value ?></li>
                <?php endif; ?>
              <?php endforeach; ?>

          <? endif;?>
            </ul>
            <a href="#" class="back-list" onclick="self.history.back(1)"><?php echo JText:: _('BACK_TO_THE_LIST');?></a>
          </div>

    </div>
</div>

配置文件->配置文件\图片$此->配置文件->配置文件图片:'profile2.jpg'?>“alt=”“/>
除非已启用,否则此行(#131)-


如果


但是,您也只发布了137行代码,并且您的代码说它位于第147行,因此可能还有另一个问题。

代码是什么样子的?您确定所有大括号都匹配吗?正如您所指出的,这几乎总是由大括号不匹配引起的。您是否使用具有大括号匹配功能的代码编辑器?代码是否清晰缩进?用于显示default.php页面。如果没有代码,则无法帮助您。您好,我添加了代码,请帮帮我。非常感谢!!!我在第137行使用了一个php短标记:)非常感谢,我花了大约5个小时才完成此操作:)哦,即使代码显示147行号,此特定错误仍可能出现在任何一行上或:)
<? endif;?>