当前位置: 代码迷 >> PHP >> ,关于Content-Type:application/json,高手们,帮指点一下啊
  详细解决方案

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

热度:46   发布时间:2016-04-28 17:03:11.0
求助,关于Content-Type:application/json,高手们,帮指点一下啊啊啊啊啊。
要求: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">&nbsp;</td>
      <td width="84%" height="20">  <input type="submit" name="submit" value="发布"></td>
    </tr>
  </table>
  
</form>
</body>
</html>

------解决思路----------------------
你要干什么?
不就是个表单页吗?哪来的 json?
  相关解决方案