我无法解决php 7.2中的问题。该代码在较低的PHP版本中正常工作。此外,我尝试了一些解决方案,但对我没有用。
public function _read($id) {
// Set query
$this->db->query('SELECT data FROM sessions WHERE id = :id');
// Bind the Id
$this->db->bind(':id',$id);
// Attempt execution
// If successful
if ($this->db->execute()) {
// Save returned row
$row = $this->db->single();
// Return the data
if (is_null($row['data'])) {
return '';
}
return $row['data'];
}
}
错误消息 警告:session_start():无法读取会话数据:C:\ xampp \ htdocs \ coupan \ functions \ mysql.sessions.php中的用户(路径:C:\ xampp \ tmp)