Session sharing between two CodeIgniter Applications

后端 未结 6 1064
失恋的感觉
失恋的感觉 2021-01-15 16:41

I have 2 codeigniter installs running on the same server.

the first app is : localhost/aa/index.php

second app is : localhost/aa/invoice/index.php

<
6条回答
  •  耶瑟儿~
    2021-01-15 16:50

    $config['sess_cookie_name'] = 'myvalue';
    

    In config.php file you can set the same value on both CI Apps., with 'file' Session Drivers

    CI_Session Object
    

    ( [userdata] => Array ( [__ci_last_regenerate] => 1490351129 [Level] => 1 [User] => 103 [Fullname] => Ruben Caldera )

    [_driver:protected] => files
    [_config:protected] => Array
        (
            [cookie_lifetime] => 600
            [cookie_name] => MyHiddenValue
            [cookie_path] => /
            [cookie_domain] => 
            [cookie_secure] => 
            [expiration] => 600
            [match_ip] => 
            [save_path] => /tmp
        )
    

    )

提交回复
热议问题