mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
修正Mongo驱动
This commit is contained in:
@@ -50,7 +50,7 @@ class Mongo extends Driver {
|
|||||||
if(empty($config)) $config = $this->config['connection'];
|
if(empty($config)) $config = $this->config['connection'];
|
||||||
$host = 'mongodb://'.($config['username']?"{$config['username']}":'').($config['password']?":{$config['password']}@":'').$config['hostname'].($config['hostport']?":{$config['hostport']}":'').'/'.($config['database']?"{$config['database']}":'');
|
$host = 'mongodb://'.($config['username']?"{$config['username']}":'').($config['password']?":{$config['password']}@":'').$config['hostname'].($config['hostport']?":{$config['hostport']}":'').'/'.($config['database']?"{$config['database']}":'');
|
||||||
try{
|
try{
|
||||||
$this->linkID[$linkNum] = new mongoClient( $host,$this->config['params']);
|
$this->linkID[$linkNum] = new \mongoClient( $host,$this->config['params']);
|
||||||
}catch (\MongoConnectionException $e){
|
}catch (\MongoConnectionException $e){
|
||||||
E($e->getmessage());
|
E($e->getmessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user