|
文件/system/libraries/Session/Session_driver.php
发现如下代码,
/**
* Class constructor
*
* @param array $params Configuration parameters
* @return void
*/
public function __construct(&$params)
{
$this->_config =& $params;
if (is_php('7'))
{
$this->_success = TRUE;
$this->_failure = FALSE;
}
else
{
$this->_success = 0;
$this->_failure = -1;
}
}
不明觉历,为何php7 $this->_success = TRUE,而其它php版本$this->_success = 0,这值不是明明相反了么?
也因为这里造成无法正常把session数据写到memcache里,修改
/**
* Class constructor
*
* @param array $params Configuration parameters
* @return void
*/
public function __construct(&$params)
{
$this->_config =& $params;
if (is_php('7'))
{
$this->_success = TRUE;
$this->_failure = FALSE;
}
else
{
//$this->_success = 0;
//$this->_failure = -1;
$this->_success = TRUE;
$this->_failure = FALSE;
}
}
修改后可正常保存数据。但为什么不把if去掉呢?哈哈,保留证据...... |
|