>
(annotation) <#2 The live section inherits from the general section.>
We can now load this ini file in two ways. On the live site, the INI file is loaded with the command:
$config = new Zend_Config_Ini('config.ini', 'live');
which loads the live configuration. To load the dev configuration for use on a developer??™s local
workstation, the load statement would be:
$config = new Zend_Config_Ini('config.ini', 'dev');
Licensed to Menshu You
Please post comments or corrections to the Author Online forum at
http://www.manning-sandbox.com/forum.jspa?forumID=329
In both cases, Zend_Config will load the ???general??? section first and then apply the settings in the specific
???live??? or ???dev??? section,. This will have the effect of selecting a different database depending on whether the
application is running on the live or development server.
The Places configuration file
As we will have only one configuration file, we will call it config.ini as shown in listing 3.2 and place it in the
application directory.
Listing 3.2: The initial config.ini for Places contains just database connection information.
[general]
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = zfia
db.config.password = 123456
db.config.
Pages:
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93