initialize 问题

浏览:749 发布日期:2013/06/23 分类:求助交流 关键字: 初始化 跳转
<?php

class BaseAction extends Action {

    public function _initialize()
    {
        if(isset($_SESSION['USER_AUTH_KEY']) &&($_SESSION['USER_AUTH_KEY']!='')) {

            $id=$_SESSION['USER_AUTH_KEY'];

               $user=M('member');
               $dao= $user->where("user_id='$id'")->find();
               $this->assign('data',$dao);

               $goodsCount = $this->GoodsCount();
            $memberCount = $this->memberCount();
            $storeCount = $this->storeCount();
           
            $this->assign('goodsCount',$goodsCount);
            $this->assign('memberCount',$memberCount);
            $this->assign('storeCount',$storeCount);
               
        }else {
            //错误页面的默认跳转页面是返回前一页,通常不需要设置
            $this->error('木有登录,请登录!','Login/Index');
            
        }
}
?>
现在遇到这个奇怪的问题。。页面木有跳转 _initialize 死循环一样执行。。。注我其他类继承自baseAction 求大神解释下。。
最佳答案
评论( 相关
后面还有条评论,点击查看>>