doubian19900911 2014-06-30 12:37
浏览 38

codeigniter会话在使用头函数后到期

My sessions expires after using this code on my controller :

header("Location: $url?$params");

This is the main function which will make me to go to a site. After doing some process,it will redirect it back to my website.But there my session expires.what is the main problem behind this?

Here is my session settings on my config.php

$config['sess_cookie_name']     = 'ci_session';
$config['sess_expiration']      = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie']  = FALSE;
$config['sess_use_database']    = FALSE;
$config['sess_table_name']      = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']  = 300;
  • 写回答

2条回答 默认 最新

  • duankuixi1930 2014-06-30 12:51
    关注

    You need to change this config:

    $config['sess_match_useragent'] = TRUE;
    

    To:

    $config['sess_match_useragent'] = FALSE;
    

    Try this and check hopefully it will solve your problem.

    评论

报告相同问题?

悬赏问题

  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题