From 295b122644a5d79878a48736258d89b810a16f8e Mon Sep 17 00:00:00 2001 From: zhaoxiang <756958008@qq.com> Date: Sun, 14 Jan 2018 02:31:17 +0800 Subject: [PATCH] =?UTF-8?q?modified=20=E4=BC=98=E5=8C=96POST=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thinkphp/library/think/Request.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thinkphp/library/think/Request.php b/thinkphp/library/think/Request.php index 4a40d22..55ec1a2 100755 --- a/thinkphp/library/think/Request.php +++ b/thinkphp/library/think/Request.php @@ -692,10 +692,10 @@ class Request { if (empty($this->post)) { $content = $this->input; - if (empty($_POST) && false !== strpos($this->contentType(), 'application/json')) { - $this->post = (array) json_decode($content, true); - } else { + if(false !== strpos($this->contentType(), 'multipart/form-data')) { $this->post = $_POST; + } else { + $this->post = (array) json_decode($content, true); } } if (is_array($name)) {