客户端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>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号