我可以得到任何解决此问题的建议吗? 我的控制器页面是(session.php)
class Session extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model("session_model");
$language = $this->session->userdata('lang');
$this->lang->load('session', $language);
$this->load->helper('ff_helper');
}
public function index() {
$query=$this->db->query('select * from school_sessions');
$rows=$query->result();
$data=array( 'result'=>$rows);
$this->data["subview"] = "session/index";
$this->load->view('_layout_main', $this->data);
}
}
我创建了模型页面&查看页面,但我想显示我的数据库中任何用户的上次登录历史记录。
在数据库中,登录会话已更新,但一旦我要显示然后不显示
error is showing
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Session::$session
Filename: controllers/session.php
Line Number: 8