• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Order of loading config and constants

#1
When CI first loads the config.php file, it first grabs the one located at

    /application/config/config.php

and then it loads the one located at

    /application/config/ENVIRONMENT/config.php

But when loading constants.php, it does it in the reverse order:

    /application/config/ENVIRONMENT/constants.php

and then

    /application/config/constants.php

Is there any reason for the change in different order? I would like to load a global constant in /application/config/constants.php that is referenced in the ENVIRONMENT/constants.php file, but they load in a backwards order.

I see the order for config.php referenced at https://www.codeigniter.com/user_guide/l...vironments but nothing about the order for constants.php

Is this arbitrary? Any chance it could be changed in future releases?
Reply


Messages In This Thread
Order of loading config and constants - by pbarney - 01-24-2018, 09:52 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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