为什么smarty 3不考虑codeIgniter会话变量:
$this->session->set_userdata('userId', $res['id']); // this doesn't work
$_SESSION['userId']=$res['id']; // this works.我在smarty中以如下方式访问它:
{$smarty.session.userId} 发布于 2012-10-15 21:36:16
在codeIgniter中
$this->session->set_userdata()函数将数据保存在cookie中,因此不能通过会话获取数据。
https://stackoverflow.com/questions/12896708
复制相似问题