其实还是比想象简单很多的。手册也有,但是还是要记录一下。
配置文件
'DB_CONFIG1' => array( 'db_type' => 'mysql', 'db_user' => 'root', 'db_pwd' => '1234', 'db_host' => 'localhost', 'db_port' => '3306', 'db_name' => 'thinkphp', 'db_charset'=> 'utf8', ),
调用
$User = M('User','other_','DB_CONFIG2');
这样就可以了。足够了。