|  | 
 
 
 楼主|
发表于 2008-10-16 11:11:02
|
显示全部楼层 
| 谢谢。 我在手册里又找到了另一个方法
 您可以手动设定第三个参数来载入您的自定义数据库配置:
 $config['hostname'] = "localhost";
 $config['username'] = "myusername";
 $config['password'] = "mypassword";
 $config['database'] = "mydatabase";
 $config['dbdriver'] = "mysql";
 $config['dbprefix'] = "";
 $config['pconnect'] = FALSE;
 $config['db_debug'] = TRUE;
 
 $this->load->model('Model_name', '', $config);
 看来CI真是太灵活了,一个字,爽。。。。两个字 很爽。。。。。。 三个字 非常爽。。。。。。。
 | 
 |