ThinkPHP3.2 BUG

浏览:446 发布日期:2017/07/14 分类:求助交流 关键字: 3.2BUG
从官网下载最新的源代码ThinkPHP3.2.3完整版
然后index控制器代码<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $zlcount['ct']=111;
        $this->assign('id',1);
        $this->assign('zlcount',$zlcount);
        $this->display();
    }
}
前端模板代码  <?php if($id == 1){?>
  
            <tr>
                <th colspan="8"><h3 class="toleft">【1111】</h3></th>
              </tr>
              <tr>
    
              <th width="10%">3333</th><td><a href="{:U('index/index',array('ct'=>1))}">{$zlcount['ct']}</a></td>
    <?php }elseif($id=2){ ?>
             <th colspan="8"><h3 class="toleft">【222】</h3></th>
    <?php }else{?>
    
    <th colspan="8"><h3 class="toleft">【44444】</h3></th>
    <?php }?>
运行后发现{:U('index/index',array('ct'=>1))} 不解析       <tr>
                <th colspan="8"><h3 class="toleft">【1111】</h3></th>
              </tr>
              <tr>
    
              <th width="10%">3333</th><td><a href="{:U('zlinfo/index',array('ct'=>1))}">111</a></td>
最佳答案
评论( 相关
后面还有条评论,点击查看>>