从php ,session_set_save_handler 的_sess_read方法把session data值定义赋值给类属性不成功,后来改用全局变量赋值成功
function _sess_read($sesskey)
{
$row = $this->db->getRow('SELECT data, expiry, is_overflow FROM ' . $this->session_table . " WHERE sesskey = '" . $this->session_id . "'");
if (!empty($row))
{
if ($row['is_overflow'])
{
$row = $this->db->getRow('SELECT data, expiry FROM ' . $this->session_data_table . " WHERE sesskey = '" . $this->session_id . "'");
}
}
else
{
$this->insert_session();
}
//用面向对象赋值给属性未能成功,sessionHandle估计不支持,改用全局参数获得online_data
$GLOBALS['online_data'] = $row;
return isset($row['data']) ? $row['data'] : '';
}
本文转自ljianbing51CTO博客,原文链接:http://blog.51cto.com/ljianbing/1591543 ,如需转载请自行联系原作者