貌似我发现了tp4sae的一个bug,模版变量不解析

浏览:451 发布日期:2014/04/11 分类:求助交流 关键字: sae 模版变量
function index(){
        $shopid=0;
        if($this->isGet()){

            $shopid=$this->_param('shop_id');
            trace(ACTION_NAME.':'.$shopid);
            $this->assign('shop_id',$shopid);
        }
        $ft=M('food_type');
        if($shopid==0){
            $list=$ft->select();
        }else{
            $list=$ft->where('shop_id="'.$shopid.'"')->select();
        }
        $this->assign('list',$list);
        $this->display();
    }
我在本地用的是tp的云平台版本
本地代码运行正常
放到sae上总是偶尔有几个模版变量不解析
在本地可以的FoodTypeAction.class.php<script type="text/javascript">
function CreateNewFoodtype()
{
window.location.href = 'aimai/3/index.php/FoodType/create/shop_id/14';
}
</script>
同样的代码,在本地是这样 d
<script type="text/javascript">
function CreateNewFoodtype()
{
window.location.href = 'aimai/3/index.php/FoodType/create/shop_id/{$shop_id}';
}
</script>
在服务器上是这样的
也就是在{$shop_id}在sae上不解析
是因为js的缘故吗?

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