slim中返回结果加密的

//返回结果不加密

$this->get("/open]",function (Request $request, Response $response, $args) {
 $response->write(json_encode(['status'=>2,'code'=>null,'money'=>1,'gamemoney'=>10,'msg'=>'充值成功']));
 return $response;
 });

 

//返回结果加密

$this->get("/open]",function (Request $request, Response $response, $args) {

 return $response->withJson(['status'=>2,'code'=>null,'money'=>1,'gamemoney'=>10,'msg'=>'充值成功']);
 });

posted @ 2017-03-20 17:43  kaoru  阅读(190)  评论(0编辑  收藏  举报