Yii basic 模板支持连接多数据库

2019-07       lijiangkun

1.首先修改db配置文件,修改格式如下: return [ 'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=zjj', 'username' => 'root', 'password' => 'root', 'charset' => 'utf8', ], '...