我的http请求有问题。 我向服务器发送一个http请求(使用firefox): 该 的 requestheader
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Accept: text/html, */*; q=0.01
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: text/plain; charset=UTF-8
Pragma: no-cache
Cache-Control: no-cache
Referer: http://localhost/home1/
Content-Length: 15
Cookie: _ga=GA1.1.868084363.1437301524
Connection: keep-alive
**request body**:
`ip=192.168.1.13`
**This is my code on server:**
if(isset($_POST['ip'])){
$ip = $_POST["ip"];
echo getLightStatusById($ip).'&'.getSuccess($ip)."eos";
}else{
echo 'error';
}
我收到了消息:
error
如果我没有条件,我收到了:
undefined index...
我错了什么? 谢谢!