|
在钩子里面加载了session类在控制器里面 就加载了session提示是没有这个方法
在钩子里 $this->load->library('session') 把 用户的登录信息放在session 里面 在控制器里面想把session 里面用户的信息取出来
$this->load->library("session");
$admin_info = $this->session->userdata('last_activity');
echo $admin_info; exit;
结果提示
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Fz_goods:session
Filename: controllers/fz_goods.php
Line Number: 24
Fatal error: Call to a member function userdata() on a non-object in E:\svn\wsyd\appl\controllers\fz_goods.php on line 24
|
|