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

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


and then it loads the one located at


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


and then


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?

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-2020 MyBB Group.