一、代码
/**
* @throws \think\Exception
*/
protected function getDb(){
if(!$this->my_db){
$this->my_db = Db::connect(config('db2'));
}
}
config.php
TP5框架 之连接其他数据库配置
阅读 78
2022-09-03
/**
* @throws \think\Exception
*/
protected function getDb(){
if(!$this->my_db){
$this->my_db = Db::connect(config('db2'));
}
}
config.php
相关推荐
精彩评论(0)