正在显示
1 个修改的文件
包含
6 行增加
和
4 行删除
@@ -54,7 +54,9 @@ class DbPool { | @@ -54,7 +54,9 @@ class DbPool { | ||
54 | public function __construct($cid) | 54 | public function __construct($cid) |
55 | { | 55 | { |
56 | $this->cid = $cid; | 56 | $this->cid = $cid; |
57 | + | ||
57 | $this->connect(); | 58 | $this->connect(); |
59 | + | ||
58 | } | 60 | } |
59 | 61 | ||
60 | /** | 62 | /** |
@@ -64,7 +66,7 @@ class DbPool { | @@ -64,7 +66,7 @@ class DbPool { | ||
64 | */ | 66 | */ |
65 | public function connect(){ | 67 | public function connect(){ |
66 | $this->lastTimer = time(); | 68 | $this->lastTimer = time(); |
67 | - try { | 69 | +// try { |
68 | $this->client = new \PDO( | 70 | $this->client = new \PDO( |
69 | 'mysql:charset=utf8mb4;dbname='.DB_DATABASE.';host='.DB_HOST.';port='.DB_PORT, | 71 | 'mysql:charset=utf8mb4;dbname='.DB_DATABASE.';host='.DB_HOST.';port='.DB_PORT, |
70 | DB_USER, | 72 | DB_USER, |
@@ -75,9 +77,9 @@ class DbPool { | @@ -75,9 +77,9 @@ class DbPool { | ||
75 | \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, | 77 | \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, |
76 | ] | 78 | ] |
77 | ); | 79 | ); |
78 | - }catch (\Throwable $e){ | ||
79 | - logs($e->getMessage().$e->getTraceAsString()); | ||
80 | - } | 80 | +// }catch (\Throwable $e){ |
81 | +// logs($e->getMessage().$e->getTraceAsString()); | ||
82 | +// } | ||
81 | } | 83 | } |
82 | 84 | ||
83 | 85 |
-
请 注册 或 登录 后发表评论