curl post的时候 修改请求头 遇到点东西 理解不了

wtcsy 2013-01-24 05:34:27
先说下我对form标签的理解

form 标签 有个属性是 enctype
它有几个值,有2个经常用
multipart/form-data
application/x-www-form-urlencoded

一段html
提交的时候设置不同的enctype
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>

<body>
<form method="post" enctype="application/x-www-form-urlencoded">
<div>
<input type="text" name="aa"/>
</div>
<div>
<input type="text" name="bb"/>
</div>
<div>
<input type="text" name="cc"/>
</div>
<div>
<input type="submit" value="提交"/>
</div>
</form>
</body>
</html>




multipart/form-data
form提交的时候
数据是隔开的 不会合并成一行 如图




application/x-www-form-urlencoded
form提交的时候
数据是会被合并在一起的 如图




我在做curl的时候
Content-Type: application/x-www-form-urlencoded
我这是成这样了 隔开的
为什么会这样了 如图



curl 是模拟post提交一个数据
提交的页面在
http://www.web-youhua.com/html/web-youhua-198603159.html
请求的地址是
http://www.web-youhua.com/include/comment_save.asp?comment_add=add

求解惑啊........
...全文
539 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
凯撒null 2013-01-25
  • 打赏
  • 举报
回复
没有留意过这个东东,学习啦
xuzuning 2013-01-25
  • 打赏
  • 举报
回复
这有什么区别吗? 两者都是合法的格式,一般对长内容分开处理 各种浏览器也有自己的处理方式
wtcsy 2013-01-25
  • 打赏
  • 举报
回复
什么意思?? submit的值改成英文吗 我改了还是分开的.......
wtcsy 2013-01-25
  • 打赏
  • 举报
回复
跟理解的东西出了差别就拿来问问呗。。。。。。。 擦........
ImN1 2013-01-24
  • 打赏
  • 举报
回复
如果<input type="submit" name="submit" class="btn" value="发表评论" /> 这个value值是英文的话……

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧