From 6883352250af94c3def700e4a92d8f7ed51fec43 Mon Sep 17 00:00:00 2001 From: colly_wyx <wangyixiong_007@163.com> Date: Tue, 24 Apr 2018 10:02:50 +0800 Subject: [PATCH] 优化api框架 --- PhalApi/PhalApi/Request.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PhalApi/PhalApi/Request.php b/PhalApi/PhalApi/Request.php index f76c73b..ad9ffca 100644 --- a/PhalApi/PhalApi/Request.php +++ b/PhalApi/PhalApi/Request.php @@ -83,7 +83,7 @@ // ��������������� $this->headers = $this->getAllHeaders(); $this->get = $_GET; - $this->post = $_POST; + $this->post = !empty($_POST)?$_POST:file_get_contents('php://input'); $this->request = $_REQUEST; $this->cookie = $_COOKIE; @@ -177,7 +177,7 @@ ? $this->getDataBySource($rule['source']) : $this->data; - DI()->logger->error('test', $data); + DI()->logger->error('test', $_POST); $rs = PhalApi_Request_Var::format($rule['name'], $rule, $data); -- Gitblit v1.8.0