Welcome Guest, Not a member yet? Register   Sign In
Order of loading config and constants

(This post was last modified: 01-25-2018, 03:30 PM by dave friend.)

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
RE: Order of loading config and constants - by dave friend - 01-25-2018, 03:26 PM

Theme © iAndrew 2016 - Forum software by © MyBB