hap*_*dik 4 php session cakephp
基本问题,如果用户来自facebook,我在cakephp会话中设置变量(facebook id),如果在会话中设置了facebook id我想做不同的事情.我该怎么检查?
我做的事情如下:
if(isset($this->Session->read("fbid")) && $this->Session->read("fbid") != "")
Run Code Online (Sandbox Code Playgroud)
它是否正确?
提前致谢!
小智 11
会话组件有一个名为check的方法.
if ($this->Session->check('fbid')) {
//fbid exists in session
}
Run Code Online (Sandbox Code Playgroud)