From 627fb9b529b261afb819de3c343446c77ce03006 Mon Sep 17 00:00:00 2001 From: Haotong Lin Date: Thu, 17 Dec 2015 12:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dheader=E5=B7=B2=E5=8F=91?= =?UTF-8?q?=E9=80=81=E4=BB=8D=E8=B0=83=E7=94=A8header=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E7=9A=84notice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/response.php b/library/think/response.php index 4b209778..de569876 100644 --- a/library/think/response.php +++ b/library/think/response.php @@ -33,7 +33,7 @@ class Response 'text' => 'text/plain', ]; $type = strtolower($type); - if (isset($headers[$type])) { + if (!headers_sent() && isset($headers[$type])) { header('Content-Type:' . $headers[$type] . '; charset=utf-8'); }