欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php get数据有关问题请问

程序员文章站 2022-06-09 07:53:23
...
php get数据问题请教
PC客户端通过crul post数据至后台:
http://218.204.14.50/test/?oldip=61.141.251.21&newip=61.141.251.25&urldata=http://detail.ju.taobao.com/home.htm?spm=601#/&agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 732; .NET4.0C; .NET4.0E) &normal=100&error=102

后台PHP获取数据代码:
$oldip=$_GET["oldip"];
$newip=$_GET["newip"];
$urldata=$_GET["urldata"];
$agent=$_GET["agent"];
$normal=$_GET["normal"];
$error=$_GET["error"];
file_put_contents(test.txt,$oldip,FILE_APPEND);
file_put_contents(test.txt,$newip,FILE_APPEND);
file_put_contents(test.txt,$urldata,FILE_APPEND);
file_put_contents(test.txt,$agent,FILE_APPEND);
file_put_contents(test.txt,$normal,FILE_APPEND);
file_put_contents(test.txt,$error,FILE_APPEND);
?>

后台只能获取到oldip、newip、urldata数据,获取不到agent、normal、error数据,请问高手可能是什么原因?如何解决?
非常感谢!
------解决思路----------------------
引用:
urlencode之后还是获取不到agent、normal、error数据,但将urldata值置为test之后,就可以收到数据了,怀疑是不是$_GET长度有限制,如果不用$_GET、$_REQUEST,还有其它解决方案吗?谢谢!


$_GET有2k的限制,改用POST就好了。
------解决思路----------------------

file_put_contents('test.txt', print_r($_POST,1));
贴出 test.txt 的内容
php get数据有关问题请问

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频