why my session lost in other pages? |
Hi
it's first time that I use Codeigniter. after authentication for login I set session in Login_model.php: PHP Code: $data_session = array( PHP Code: print_r($this->session->userdata()); Code: Array Code: Array my current setting: config.php PHP Code: $config['sess_driver'] = 'files'; PHP Code: $autoload['libraries'] = array('database','template','session','encryption','form_validation'); (11-11-2017, 02:29 AM)h_qorbani Wrote: This is a full URL, not a domain name. If you want the session to only be available on that URL, do this: PHP Code: $config['cookie_domain'] = 'domain.com'; (where of course 'domain.com' is just an example and I hope you meant that as well) However, with you autoloading the session library, it will still create sessions on other paths and you'll have the same issue if you try to use them. |
Welcome Guest, Not a member yet? Register Sign In |