摘要: php版本必须是php5.4以上、记得配置php环境变量 1、下载https://github.com/yiisoft/yii2-app-advanced 2、php -r "readfile('https://getcomposer.org/installer');" | php 3、php co 阅读全文
posted @ 2016-09-06 18:58 loweringye 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1、一种为使用eval()函数 var jsonObj=eval("("+data+")"); 2、使用Function对象来进行返回解析 var jsonstr='{"name":"CJ","age":18}'; var jsonObj =(new Function("","return "+js 阅读全文
posted @ 2016-09-06 09:16 loweringye 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 异步请求将type设为"json",或者利 用$.getJSON()方法获得服务器返回,那么就不需要eval()方法,因为这时候得到的结果已经是json对象 阅读全文
posted @ 2016-09-06 09:12 loweringye 阅读(431) 评论(0) 推荐(0) 编辑