From 7c2bcbcff2083deafb5d5b9179a267d65a868435 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 27 Sep 2015 09:02:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96JSON=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/response.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/think/response.php b/library/think/response.php index 2bdf7aa3..03dc3b07 100644 --- a/library/think/response.php +++ b/library/think/response.php @@ -10,7 +10,6 @@ // +---------------------------------------------------------------------- namespace think; -use org\Transform; class Response { @@ -38,11 +37,11 @@ class Response { switch ($type){ case 'json': // 返回JSON数据格式到客户端 包含状态信息 - $data = Transform::jsonEncode($data); + $data = json_encode($data, JSON_UNESCAPED_UNICODE); break; case 'xml': // 返回xml格式数据 - $data = Transform::xmlEncode($data); + $data = \org\Transform::xmlEncode($data); break; case 'jsonp': // 返回JSON数据格式到客户端 包含状态信息