codeigniter cookie expiry problem

后端 未结 3 1733
别跟我提以往
别跟我提以往 2021-01-19 07:19

I\'m having a cookie issue, the expiry date on my cookie is always being set to At End Of Session which isn\'t what I want. I did a bit of goggling and it suggested it set t

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-19 07:52

    Please check out the answer below by @Gowri for how to do it properly.

    You can try to adjust session expiration time in config.php CI session initially is saved in cookies:

    /** Session Variables
     ---------------------------------------
    | 'session_expiration'  = the number of SECONDS you want the session to last.
    |  by default sessions last 7200 seconds (two hours).  Set to zero for no expiration.
    |
    */
    
    $config['sess_expiration']      = 7200;
    

提交回复
热议问题