客户端socket发送http POST请求可以触发服务端PHP页面的isset吗?
我在客户端使用SOCKET发送HTTP的POST请求
POST /send.php HTTP/1.1
Host: www.temp.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
Gecko/20050225 Firefox/1.0.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 6
Connection: Keep-Alive
testname=a
www.temp.com/send.php页面如下
<?php //保存post请求的数据 file_put_contents("log.txt", json_encode($_POST)); ?> 看看log.txt就知道了 <div class="clear"> </div>