浏览器格式化JSON输出,thinkphp

1 1 //编写类方法用$this->ajaxReturn()返回数据
2 2 public function index(){
3 3       $user = M('User');
4 5       $data = $user->where($map)->field('name,data')->select();
5 6       $this->ajaxReturn($data,'JSON');
6 7     }

 

 

posted @ 2015-07-26 12:16  彼扬  阅读(751)  评论(0编辑  收藏  举报

感谢您的阅读,如果有了您的奉献系统会更加完善