0

My code works for set new session and get them. But sessions which are already generated in CI are not getting access outside .

<?php
    ob_start();
    include('index.php');
    ob_end_clean();
    $CI =& get_instance();
    $CI->load->library('session'); //if it's not autoloaded in your CI setup

     echo '<pre>'; print_r($CI->session->all_userdata());  /* not working .not showing CI sessions*/

    echo "Ff";$CI->session->set_userdata('d','gg');  /* working for setting new session */

    echo $CI->session->userdata('d'); $CI->session->userdata('name');  /* working for getting new session */

?>
MaxiGui
  • 6,190
  • 4
  • 16
  • 33
  • 1
    [Access Session from Outside Codeigniter Installation](https://stackoverflow.com/questions/31006756/codeigniter-3-access-session-from-outside-codeigniter-installation) – Alive to die - Anant Feb 15 '21 at 09:52
  • This is done as per this link . but using this new sessions can be created and use but the one which are existing are not able to get. @AlivetoDie – Meenu Dogra Feb 17 '21 at 06:58

0 Answers0