From 18eba1c239fe7ff059311c08a9e9ce59fac5c6c5 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 9 Oct 2023 15:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thinkphp/library/think/db/Connection.php | 1 + 1 file changed, 1 insertion(+) diff --git a/thinkphp/library/think/db/Connection.php b/thinkphp/library/think/db/Connection.php index 7adcddf..9f27304 100644 --- a/thinkphp/library/think/db/Connection.php +++ b/thinkphp/library/think/db/Connection.php @@ -117,6 +117,7 @@ abstract class Connection PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, PDO::ATTR_STRINGIFY_FETCHES => false, PDO::ATTR_EMULATE_PREPARES => false, + PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'" ]; // 绑定参数