看样子是thinkphp5.1模板解析有bug

浏览:721 发布日期:2018/09/28 分类:ThinkPHP5专区
这段代码在 thinkphp 5.0.x 的版本上正常,用到 tp5.1 就报错了,看样子是 tp5.1的bug。
以下是模板生成的 php 文件代码。<div class="weui-panel__bd">
                    <div class="weui-cells_notbefore">
                        <?php if(count($weekPlanList) > 0): if(is_array($weekPlanList) || $weekPlanList instanceof \think\Collection || $weekPlanList instanceof \think\Paginator): $i = 0; $__LIST__ = $weekPlanList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <div class="weui-cell my-cell">
                            <div class="weui-cell__bd">
                                <a href="<?php echo url('WeekPlan/detail',array('id'=>think_encrypt($vo['plan_id']))); ?>">
                                    <?php echo htmlentities(date('Y-m-d',###,!is_numeric($vo['current_date_begin'])? strtotime($vo['current_date_begin']) : $vo['current_date_begin'])); ?>~<?php echo htmlentities(date('Y-m-d',###,!is_numeric($vo['current_date_end'])? strtotime($vo['current_date_end']) : $vo['current_date_end'])); ?>
                                </a>
                            </div>
                        </div>
                        <?php endforeach; endif; else: echo "" ;endif; else: ?>
                        <h1 class="text-center">没有填写周志</h1>
                        <?php endif; ?>
                    </div>
                </div>

附件 2.png ( 104.14 KB 下载:6 次 )

最佳答案
评论( 相关
后面还有条评论,点击查看>>