我正在存储一个不同的会话,例如 id、type、isloggedin,最后是 comp_city,我将城市名称存储到 comp_city 会话中。
例如,我将“旧金山”存储到会话 comp_city,它成功了,现在我重定向到另一个页面,我想使用 comp_city 的值,但奇怪的是,它没有将“旧金山”作为我的值,而是给了我“img” '。会有什么问题?是因为我使用了太多会话吗?
public function index($city='', $error=null)
{
if($city == '')
{
$city = 'San Francisco';
$this->session->set_userdata(array('compcity' => $city));
}else if($city)
{
$city = urldecode($city);
$this->session->set_userdata(array('compcity' => $city));
}
....