尝试执行以下命令时,我收到此错误:
curl -i -v -X POST -H Accept:*/* -H Cont
ent-Type:application/json -d "{user:{firstname:"Jane",lastname:"Smith"" -L "http
://site.com/test.php"
* timeout on name lookup is not supported
* About to connect() to site.com port 80 (#0)
* Trying 38.102.226.21...
* connected
* Connected to site.com (38.102.226.21) port 80 (#0)
> POST /test.php HTTP/1.1
> User-Agent: curl/7.26.0
> Host: site.com
> Accept:*/*
> Content-Type:application/json
> Content-Length: 36
>
* upload completely sent off: 36 out of 36 bytes
* Empty reply from server
* Connection #0 to host site.com left intact curl: (52) Empty reply from server
* Closing connection #0
test.php只是这样做:var_dump($ _ POST);
可能是什么原因造成的?请求没有到达我的index.php接收所有流量,所以这不能与我的PHP代码有关吗?
有什么想法吗?