Caching problem, the statement in else executes normally, but a screenshot error occurs in if($cache)? Ask God
王岁洋
王岁洋 2017-11-10 20:15:12
0
3
1033

public function train_surp(){
        $cache=Cache::get('train_surp');
        if($cache){
            $this->assign('list',unserialize($cache));
        }
        else{
            $retult=train::paginate(5);
            Cache::set('train_surp',$retult,10);
            $list=Cache::get('train_surp');
            $this->assign('list',$list);
        }
        return $this->fetch();
    }QQ截图20171110201309.png

王岁洋
王岁洋

reply all(2)
myfey

if($cache){$cache in

should be the object type

if (this is a Boolean value judgment that cannot determine the object type)



猪哥

I don’t see what you are asking specifically?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template