尊敬的 stackoverflow 会员 PHP 开发人员。尽管项目中有所有编码,但我一直收到以下错误。它在最后一行的第 102 行给出了一个语法错误。我收到错误“语法错误,文件意外结束”。我已经尝试了 3 天,但我找不到错误。非常感谢您的帮助。
<?php foreach($entrysquizquest as $key => $entry): ?>
<section class="entry quizquestion selectableQuest" id="section_<?php echo e($entry->order); ?>" data-entry="<?php echo e($entry->id); ?>">
<?php if($entry->title): ?>
<h2 class="sub-title" >
<?php echo e($entry->title); ?>
</h2>
<?php endif; ?>
<div class="media">
<div class="sharemedia">
<?php echo $__env->make('._particles.others.entrysharebuttons', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>
<a id="" class="gif-icon-a"><img class="img-responsive" style="display: block;width:100%" alt="<?php echo e($entry->title); ?>" src="<?php echo e(makepreview($entry->image, null, 'entries')); ?>"></a>
<small><?php echo $entry->source; ?></small>
</div>
<p>
<?php echo $entry->body; ?>
</p>
<div class="clear"></div>
<div class="answer" style="margin-left:-15px;">
<?php $sitep = $post->entry()->where('type', 'answer')->where('source', $entry->id)->get(); ?>
<ol class="option-selection <?php if($entry->video == '1'): ?>thdefault <?php else: ?> <?php echo e($entry->video == "2" ? 'thlarge' : 'thlist'); ?><?php endif; ?>">
<?php foreach($sitep as $keya => $answers): ?>
<?php $keya=$keya+1;?>
<li>
<a class="" href="javascript:" data-answer="<?php echo e($answers->id); ?>" data-result="<?php echo e($answers->video); ?>" >
<div class="answer-cover">
<?php if($entry->video!='3'): ?>
<img class="responsive-img" alt="<?php echo e($answers->title); ?>" src="<?php echo e(makepreview($answers->image, null, 'answers')); ?>">
<?php endif; ?>
<h4 class="option-sel" >
<i class="fa fa-square-o answer-check"></i>
<span class="option-text">
<?php echo $answers->title > "" ? $answers->title : '<br>'; ?>
</span>
</h4>
</div>
</a>
<div class="clear"></div>
</li>
<?php if(($keya%3)==0 and $entry->video=='1' or ($keya%2)==0 and $entry->video=='2' ): ?>
</ol><div class="clear"></div> <ol class="option-selection <?php if($entry->video == '1'): ?>thdefault <?php else: ?> <?php echo e($entry->video == "2" ? 'thlarge' : 'thlist'); ?><?php endif; ?>">
<?php endif; ?>
<?php endforeach; ?>
</ol>
</div>
<div class="clear"></div>
</section>
<section class="entry results" id="quiz_result" data-popup="<?php echo e(getcong('BuzzyQuizzesPopup')); ?>">
<div class="quiz_result_area">
<h2 class="post-title"><?php echo e($post->title); ?></h2>
<ol>
<?php foreach($entrysquizresults as $keyp => $entry): ?>
<li class="quiz_result" data-order="<?php echo e($keyp); ?>" data-result="<?php echo e($entry->id); ?>" data-link="<?php echo e(Request::url()); ?>" data-name="<?php echo e(trans('buzzyquiz.yougot', ['title'=> $entry->title])); ?>" data-iname="<?php echo e(trans('buzzyquiz.igot', ['title'=> $entry->title, 'posttitle'=> $post->title])); ?>" data-itname="<?php echo e(trans('buzzyquiz.igotfortweet', ['title'=> $entry->title])); ?>" data-description="<?php echo e(strip_tags($entry->body)); ?>" data-picture="<?php echo e($entry->image > "" ? makepreview($entry->image, null, 'entries') : makepreview($post->thumb, 'b', 'posts')); ?>">
<h2 class="quiz_headline">
<?php echo e(trans('buzzyquiz.yougot', ['title'=> $entry->title])); ?>
</h2>
<div class="clear"></div>
<div class="quiz_text" <?php echo e($entry->image == '' ? 'style=width:100%' :''); ?><?php echo $entry->body; ?></div>
<div class="quiz_img <?php echo e($entry->image == '' ? 'hide' :''); ?>" >
<img class="responsive_img" style=" float: right;" src="data:image/gif;base64,R0lGODlhAQABAPAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
</div>
</li>
<?php endforeach; ?>
</ol>
</div>
<div class="clear"></div>
<div class="quiz_result_share">
<h2 class="bold share_title"><?php echo e(trans('buzzyquiz.shareresult')); ?></h2>
<div class="external-sign-in">
<a href="javascript:" class="Facebook postToResultFeed"><?php echo e(trans('index.sharefacebook')); ?></a>
<a href="javascript:" class="Twitter postToResultFeed"><?php echo e(trans('index.sharetweet')); ?></a>
<a href="javascript:" class="Pinterest postToResultFeed"><?php echo e(trans('index.sharepinterest')); ?></a>
<a href="https://plus.google.com/share?url=<?php echo e(Request::url()); ?>" class="Google popup-action"><?php echo e(trans('index.sharegoogle')); ?></a>
</div>
<div class="clear"></div>
</div>
</section>
在第 57 行添加
<?php endforeach; ?>
你忘了结束 foreach
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句