0
点赞
收藏
分享

微信扫一扫

api接口返回封装的方法函数

文风起武 2023-02-16 阅读 82


if (!function_exists('returnjosn')) {

//json封装
function returnjosn($code="1002", $msg="失败", $data=[])
{


$att=['code'=>$code , 'msg'=>$msg,'time'=>time(), 'data'=>$data];


return json_encode($att);


}
}


举报

相关推荐

0 条评论