1. 简介
配置文件类, 配置文件格式可以是ini, xml等
2. Section 片段
[DB]
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = jack
db.config.password = 111111
db.config.dbname = zftest
db.config.port = 3306
===调用ini配置文件
$config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini', 'DB');
$driver = $config->db->adapter;
$para3 = array( 'host'=>$config->db->config->host,
'username'=>$config->db->config->username,
'password'=>$config->db->config->password,
'dbname'=>$config->db->config->dbname,
'port'=>$config->db->config->port
);
===
阅读(465) | 评论(0) | 转发(0) |