• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Config helper function


In the previous version (3.x) you could call a config item by calling it like "config_item('somevar');" but in CI4 I cannot find it (or me is stupid)..

Did this change, and do we need to work around it, or is it just calling the config in the controller because it's not autoloaded by default? By the way i'm talking about the main config.

Thanks in advance!

Stupid me, you can do this via https://bcit-ci.github.io/CodeIgniter4/g...ation.html (.env explanation).
Solved this by adding it to the .env file and call it with "getenv('somevar')"

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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