作者 邓超

x

... ... @@ -54,7 +54,9 @@ class DbPool {
public function __construct($cid)
{
$this->cid = $cid;
$this->connect();
}
/**
... ... @@ -64,7 +66,7 @@ class DbPool {
*/
public function connect(){
$this->lastTimer = time();
try {
// try {
$this->client = new \PDO(
'mysql:charset=utf8mb4;dbname='.DB_DATABASE.';host='.DB_HOST.';port='.DB_PORT,
DB_USER,
... ... @@ -75,9 +77,9 @@ class DbPool {
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
]
);
}catch (\Throwable $e){
logs($e->getMessage().$e->getTraceAsString());
}
// }catch (\Throwable $e){
// logs($e->getMessage().$e->getTraceAsString());
// }
}
... ...