Access config from another

#1
[eluser]louis w[/eluser]
Can I access the site config (/config/config.php) from the database config?

#2
[eluser]xwero[/eluser]
I think the only possibility is to include it.

#3
[eluser]louis w[/eluser]
It would be nice to be able to do this. That way in the site config I can do a check to see if the site is development or production (if (strpos(strtolower($_SERVER['HTTP_HOST']), 'local') === false) {) and then use it throughout the entire app to switch settings.

#4
[eluser]xwero[/eluser]
I saw some posts where people showed their solution for what you want. You should do a forum search.

#5
[eluser]webthink[/eluser]
maybe set a constant in config which you can then read in database


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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