Switching from development to production
Posted: Thu Sep 10, 2009 2:41 pm
Hi everyone
I have a config.ini file that contains the following
[development]
debug = true
database.host = localhost
database.database = dbname
database.username = username
database.password = password
[production]
debug = false
database.host = localhost
database.database = dbLive
database.username = root
database.password = pass
I have used parse_ini to parse the file and I can then retrieve the values of the various settings. However, is there an easy way to tell my application to use the settings in [development] or [production]? I'm sure I did this before but for the life of me I can't figure out what I did.
Many thanks,
Cols2910
I have a config.ini file that contains the following
[development]
debug = true
database.host = localhost
database.database = dbname
database.username = username
database.password = password
[production]
debug = false
database.host = localhost
database.database = dbLive
database.username = root
database.password = pass
I have used parse_ini to parse the file and I can then retrieve the values of the various settings. However, is there an easy way to tell my application to use the settings in [development] or [production]? I'm sure I did this before but for the life of me I can't figure out what I did.
Many thanks,
Cols2910