To use the session library in CI 3, you need to set the session save path.
Where should I save the sessions? (path)
Maybe can somebody why I should use the database driver to save sessions because it's better?
To use the session library in CI 3, you need to set the session save path.
Where should I save the sessions? (path)
Maybe can somebody why I should use the database driver to save sessions because it's better?
You can use:
$r = implode('/', array_slice(explode('/', $_SERVER["SCRIPT_FILENAME"]),0,-1));
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'my_session';
$config['sess_expiration'] = 14400;
$config['sess_save_path'] = $r.'/session/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 600;
$config['sess_regenerate_destroy'] = FALSE;