• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session Library

#1
Codeigniter noob here: I'm trying to find how I can load the session library at app run since I plan on using several session variables throughout. I'm sure I am missing something. Can anyone point me to the right place?
Thanks.
Reply

#2
CodeIgniter version?
Reply

#3
(07-22-2020, 12:20 PM)jreklund Wrote: CodeIgniter version?
4.0.4 (sorry)
Reply

#4
Then you can just open up /app/Controllers/BaseController.php and uncomment:
Code:
// $this->session = \Config\Services::session();

And you can access it with $this->session in your controllers.
Reply

#5
(07-22-2020, 12:24 PM)jreklund Wrote: Then you can just open up /app/Controllers/BaseController.php and uncomment:
Code:
// $this->session = \Config\Services::session();

And you can access it with $this->session in your controllers.
Smile Right on! Thanks!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme ¬© 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.