我正在使用cakePHP 1.26。 在.ctp文件,我喜歡這樣的代碼的幾個:非對象的成員函數check()
$sess = $this->Session->check('user');
if($sess){
// do soemthing
}
else{
// do soemthing then
}
但我得到這個錯誤,那麼:
Fatal error: Call to a member function check() on a non-object in /home/vol12/mysite.com/htdocs/app/views/layouts/testing1.ctp on line 10
我可以用檢查方法的.ctp文件檢查會話是否存在?
在1.26中是否存在Session的'check()'?我知道1.3 ... – 2010-07-02 15:33:03