mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 优化POST数据获取
This commit is contained in:
parent
83b48377ac
commit
295b122644
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user