php的api数据接口书写实例(推荐)

时间:2020-12-19 15:48:16
【文件属性】:
文件名称:php的api数据接口书写实例(推荐)
文件大小:44KB
文件格式:PDF
更新时间:2020-12-19 15:48:16
api api接口 hp 以下是接口代码实例: <?php $output = array(); $a = @$_GET['a'] ? $_GET['a'] : ''; $uid = @$_GET['uid'] ? $_GET['uid'] : 0; if (empty($a)) { $output = array('data'=>NULL, 'info'=>'坑爹啊!', 'code'=>-201); exit(json_encode($output)); } //走接口 if ($a == 'get_users') { //检查用户 if ($uid == 0) { $output = array

网友评论