如何从模型中设置$ config [' sess_expiration'] codeigniter?

时间:2016-09-23 07:59:34

标签: php codeigniter

如何从用户设置中设置会话销毁?

CONFIG

$ses_destroy = $this->loginmodel->set_session_destroy();

$config['sess_expiration'] = $ses_destroy; 

MODEL

function sessions_destroy_user(){

  return echo '30';

}

1 个答案:

答案 0 :(得分:0)

$this->session->sess_expiration = '14400';// expires in 4 hours
$this->session->set_userdata($data);// set session