设置了自动加载SESSION 了。也设置session目录了,报如下错。
A PHP Error was encounteredSeverity: WarningMessage: Illegal offset type in isset or emptyFilename: Session/Session.phpLine Number: 656Backtrace:File: D:\DedeAMPZ\WebRoot\CI\application\controllers\admin\login.phpLine: 33
Function: userdataFile: D:\DedeAMPZ\WebRoot\CI\index.php
Line: 292
Function: require_once
这里session.php 里的代码。public function userdata($key = NULL) { if (isset($key)) { return isset($_SESSION[$key]) ? $_SESSION[$key] : NULL; } elseif (empty($_SESSION)) { return array(); }
$userdata = array(); $_exclude = array_merge( array('__ci_vars'), $this->get_flash_keys(), $this->get_temp_keys() );
应当怎么操作?
在你的 admin\login.php 第33行有错误 你打印一下$key的数据类型,如果$key是对象或者数组都会报上面的错误。 csw_phper 发表于 2016-5-26 14:13
你打印一下$key的数据类型,如果$key是对象或者数组都会报上面的错误。
谢谢。解决了。
页:
[1]