thinkphp3.2处理json数据
1 数组转json
/* * test json * */ public function test(){ $arr = array( "name"=>"hello", "pic"=>"img", "size"=> 666 );$this->ajaxReturn($arr,"json"); } 上面就可以直接返回json数据
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。
1 数组转json
/* * test json * */ public function test(){ $arr = array( "name"=>"hello", "pic"=>"img", "size"=> 666 );