0
点赞
收藏
分享

微信扫一扫

TP5框架 之连接其他数据库配置

晚熟的猫 2022-09-03 阅读 78

一、代码

/**
* @throws \think\Exception
*/
protected function getDb(){
if(!$this->my_db){
$this->my_db = Db::connect(config('db2'));
}
}

config.php

TP5框架 之连接其他数据库配置_php

 



举报

相关推荐

0 条评论