Home >Backend Development >PHP Tutorial >php怎么接收json

php怎么接收json

WBOY
WBOYOriginal
2016-06-13 12:05:26961browse

php如何接收json

	$.ajax({<br />		<br />       cache: true,<br />        type: "POST",<br />        url:"__URL__/index",   <br />        data:{name:$("#name").val()},<br />        async: false,<br />       datatype: "json",<br />        error: function(request) {<br />            alert("Connection error");<br />        },<br />      success: function(data) {<br />           <br />    <br />        }<br />    });

firebug,看到传过来的是name=%E7%AC%AC%E4%B8%80%E8%BD%AE,我想知道在php后台应该怎么取到name,并输出到前台页面
------解决方案--------------------
那你看到的就不是 name=%E7%AC%AC%E4%B8%80%E8%BD%AE
name=第一轮

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn