其實仍是比想象簡單不少的。手冊也有,可是仍是要記錄一下。php
配置文件mysql
'DB_CONFIG1' => array( 'db_type' => 'mysql', 'db_user' => 'root', 'db_pwd' => '1234', 'db_host' => 'localhost', 'db_port' => '3306', 'db_name' => 'thinkphp', 'db_charset'=> 'utf8', ),
調用sql
$User = M('User','other_','DB_CONFIG2');
這樣就能夠了。足夠了。thinkphp