Order of loading config and constants |
What difference does it make? All the constants in both files will be defined either way. The config/constants.php are loaded first to prevent attempted redefinition in ENVIRONMENT/constants.php for the reasons I stated earlier.
If for some reason you need a constant from config/constants.php for use in ENVIRONMENT/constants.php that could be accomplished by putting this at the top of ENVIRONMENT/constants.php PHP Code: if (file_exists(APPPATH.'config/constants.php')) Then when Codeigniter.php runs that same block nothing will change because all those constants are already defined. |
Messages In This Thread |
Order of loading config and constants - by pbarney - 01-24-2018, 09:52 PM
RE: Order of loading config and constants - by dave friend - 01-25-2018, 08:38 AM
RE: Order of loading config and constants - by pbarney - 01-25-2018, 11:39 AM
RE: Order of loading config and constants - by dave friend - 01-25-2018, 03:26 PM
RE: Order of loading config and constants - by pbarney - 01-26-2018, 09:43 AM
RE: Order of loading config and constants - by Narf - 01-26-2018, 07:59 PM
|