本文整理汇总了PHP中Json::echoJson方法的典型用法代码示例。如果您正苦于以下问题:PHP Json::echoJson方法的具体用法?PHP Json::echoJson怎么用?PHP Json::echoJson使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Json
的用法示例。
在下文中一共展示了Json::echoJson方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$userinfo = array();
$userinfo['uid'] = 10086;
$userinfo['name'] = "大帅";
$userinfo['age'] = 18;
$userinfo['sex'] = 1;
$grade = array(1, 2, 3, 4, 5, 6);
$info = array();
$info['up'] = 1;
$info['down'] = 1;
$comment_data = array();
$comment_data['uid'] = 10086;
$comment_data['name'] = "大帅";
$comments = array($comment_data, $comment_data);
$pinfo = array();
$pinfo['id'] = 2;
$pinfo['uid'] = '10086';
$pinfo['rid'] = '10086';
$pinfo['money'] = 100.25;
$pinfo['key'] = 'tokendddsxsedfs115';
$pinfo['alias'] = 'techer';
$pinfo['aliastype'] = 'yousi.com';
$pinfo['date'] = '2015-11-12 15:17:23';
$pinfo['clientdate'] = 1446450068;
$pinfo['info'] = $info;
$pinfo['grade'] = $grade;
$pinfo['comments'] = $comments;
$pinfo['userinfo'] = $userinfo;
/**测试地址 Example.php?document=truxish2114558de*/
document($pinfo, 'PushInfoData');
Json::echoJson($pinfo);
示例2: dirname
<?php
include_once dirname(__FILE__) . "/data.api.php";
include_once dirname(__FILE__) . "/../classes/Json.class.php";
$city1 = array();
$city1['id'] = 1;
$city1['name'] = "泉州市";
$city2 = array();
$city2['id'] = 2;
$city2['name'] = "上海市";
$citylist[] = $city1;
$citylist[] = $city2;
/**测试地址 Example.php?document=truxish2114558de*/
document('GetCityList', $citylist);
Json::echoJson($citylist);