开发者

access session data inside ouput class in codeigniter

开发者 https://www.devze.com 2023-03-07 08:00 出处:网络
I want to access codeignit开发者_开发百科er session data i.e $this->session->userdata(\'session_id\');

I want to access codeignit开发者_开发百科er session data i.e $this->session->userdata('session_id');

inside ouput class i.e secure_system_folder/core/Output.php.


$CI =& get_instance;
$sess_id = $CI->session->userdata('session_id');

But what you're probably looking for is hooks, they're a much easier way to extend the core without directly editing (and therefore possibly breaking) core files.

0

精彩评论

暂无评论...
验证码 换一张
取 消