Where to declare an application-wide variable? |
[eluser]behdesign[/eluser]
I want to declare a variable that will be used throughout the application (namely, a $SITE_ID variable that gets pulled from the db from the base_url). Where is the best place to do that in the cascade? Thanks!
[eluser]Cro_Crx[/eluser]
Any constants that aren't going to be modified can be specified in constants.php. If you wish to store config variables in a database, you can read them in using the config class http://ellislab.com/codeigniter/user-gui...onfig.html
[eluser]pdxbenjamin[/eluser]
Check out my previous thread. http://ellislab.com/forums/viewthread/142718/
[eluser]jedd[/eluser]
[quote author="behdesign" date="1266143814"] ... a $SITE_ID variable that gets pulled from the db from the base_url ... [/quote] Where does it get pulled from? |
Welcome Guest, Not a member yet? Register Sign In |