Home > Backend Development > PHP Tutorial > php json解决思路

php json解决思路

WBOY
Release: 2016-06-13 13:05:44
Original
780 people have browsed it

php json
前台通过ajax向后台的php页面发送一个数据,后台接受后,从数据库读取的数据(大量)以json的格式返回给前台页面,前台页面接受后如何处理,得到对应的结果???

------解决方案--------------------
js 的eval

或者直接使用jquery 的 getJSON
------解决方案--------------------
json_encode一下就可以了
------解决方案--------------------
function(data)

那就是处理js对象的事情了.这个自己搜索一下吧

例如 

alert(data.xxxx);
------解决方案--------------------
前台页面接受后如何处理?

难道你不先协商好数据格式吗?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template