求助,关于Content-Type:application/json,高手们,帮指点一下啊啊啊啊啊。

mm0001 2015-09-01 04:16:08
要求:HTTP Header中设置 Content-Type:application/json
代码如下,可是我不知道怎么改

1、<meta http-equiv="Content-Type:application/json" 直接这样改,不行的。
2、网上查header('Content-type: application/json');,于是在最上面加了个<?php header('Content-type: application/json');
?>,哎呀妈呀,更不行了。

求高手指点一下, 我这样的代码,这个Content-Type:application/json到底咋弄呢。谢谢!


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>测试</title>
</head>
<body>
<form action="https://oapi.dingtalk.com/department/create?access_token=e02222" method="post" name="form1" onSubmit="return doCheck();">
<table width="24%" align="center" border="1" cellspacing="0" cellpadding="1" >
<tr class="lanyuss">
<td height="35">大部门:</td>
<td height="35"><input type="text" id="1" name="parentid" maxlength="30" size="30" value="1"/></td>
</tr>
<tr class="lanyuss">
<td height="20">子部门:</td>
<td height="35"><input type="text" name="name" maxlength="30" size="30" value="2222"/></td>
</tr>
<tr class="lanyuss">
<td width="16%" height="20"> </td>
<td width="84%" height="20"> <input type="submit" name="submit" value="发布"></td>
</tr>
</table>

</form>
</body>
</html>
...全文
478 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
mm0001 2015-09-06
  • 打赏
  • 举报
回复
顶一下。看还那个帮忙解决?????
mm0001 2015-09-01
  • 打赏
  • 举报
回复
回楼上,钉钉企业号 需要HTTP Header中设置 Content-Type:application/json 我这个表单文件存为PHP的。 求助,我这个里面怎么加Content-Type:application/json这个玩意儿
xuzuning 2015-09-01
  • 打赏
  • 举报
回复
你要干什么? 不就是个表单页吗?哪来的 json?