如何获取GET提交方式
来源:百度知道 编辑:UC知道 时间:2024/05/15 03:26:24
<form action="http://你的网址/login.php" method="post">
<tr><td>
用户名: <input type="text" size="8" name="pwuser" />
密码: <input type="password" size="8" name="pwpwd" />
<!--
EOT;
list(,$logingd)=explode("\t",$db_gdcheck);
if($logingd){
$rawwindid=addslashes($windid);
print <<<EOT
--><!--
EOT;
}print <<<EOT
-->
<input type="hidden" name="step" value="2" />
<input type="hidden" name="lgt" value="0">
<input type="submit" value="登 录" /></td>
</tr></form></table>
我自己捣鼓。
http://你的网址/login.php?pwuser=用户名&pwpwd=密码&step=2&lgt=0
可是不成功,是不是要添加个submit=yes???好像
1. get是从服务器上获取数据,post是向服务器传送数据。
2. get是把参数数据队列加到提交表单的ACTION属性所指的URL中,值和表单内各个字段一一对应,在URL中可以看到。post是通过HTTP post机制,将表单内各个字段与其内容放置在HTML HEADER内一起传送到ACTION属性所指的URL地址。用户看不到这个过程。
3. 对于get方式,服务器端用Request.QueryString获取变量的值,对于post方式,服务器端用Request.Form获取提交的数 据。
4. get传送的数据量较小,不能大于2KB。post传送的数据量较大,一般被默认为不受限制。但理论上,IIS4中最大量为80KB,IIS5中为 100KB。
5. get安全性非常低,post安全性较高。但是执行效率却比Post方法好。
不能使用简单的URL传输方式
可以使用代码模拟POST
# Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
# byte[] arrB = encode.GetBytes(sXmlMessage);
# HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(DsmpUrl);
# myReq.Method = "POST" ;
# myReq.ContentType = "application/x-www-form-urlencoded";
# myReq.ContentLength = arrB.Length;
# Stream outStream = myReq.GetRequestStream();
# outStream.Write(arrB,0,arrB.Length);
# outStream.Close();
1、PHP4以后获取传值的方法
一般在页面中传值常见的是