How to print all session variables currently set?

后端 未结 7 2056
眼角桃花
眼角桃花 2020-12-12 18:56

Without having to call each session variable by name, is there a way to display the content of all the session variables currently set?

7条回答
  •  青春惊慌失措
    2020-12-12 19:24

    this worked for me:-

    ' . print_r($_SESSION, TRUE) . ''; ?>

    thanks for sharing code...

    Array
    (    
        [__ci_last_regenerate] => 1490879962
    
        [user_id] => 3
    
        [designation_name] => Admin
        [region_name] => admin
        [territory_name] => admin
        [designation_id] => 2
        [region_id] => 1
        [territory_id] => 1
        [employee_user_id] => mosin11
    )
    

提交回复
热议问题