From 3ae1f38e60de73f9a0a2d985e4e7fa467d57c76a Mon Sep 17 00:00:00 2001 From: qinzongqing Date: Wed, 19 Apr 2023 16:45:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ControllerBase.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/ControllerBase.php b/app/controllers/ControllerBase.php index 697bd22..a5eeb14 100644 --- a/app/controllers/ControllerBase.php +++ b/app/controllers/ControllerBase.php @@ -157,11 +157,8 @@ class ControllerBase extends Phalcon\Mvc\Controller{ $this->_LogObj->LogWrite(TIFFANY_API_CHECK_LOG, file_get_contents("php://input")); } /**/ - //接收请求数据 - $request_json = file_get_contents("php://input"); - $request_json = !empty($request_json)?$request_json:$this->request->getPost(); //如果未获取到请求数据 - if(empty($request_json)){ + if(empty(file_get_contents("php://input"))){ //告知用户"系统繁忙,请稍候再试" $rs['errmsg'] = "系统繁忙,请稍候再试"; $rs['errcode'] = -1; @@ -170,7 +167,7 @@ class ControllerBase extends Phalcon\Mvc\Controller{ //如果有获取到请求数据 else{ //准备判断请求数据整体是否为空 - $request_arr = json_decode($request_json, true); + $request_arr = json_decode(file_get_contents("php://input"), true); //如果请求数据整体为空 if(empty($request_arr)){ //告知用户"系统繁忙,请稍候再试"