系统出错输出json新增头信息

feat/task1-c-wallet
gongfuxiang 2022-01-28 23:37:35 +08:00
parent a190548c57
commit 6d185497f5
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,9 @@ class ExceptionHandle extends Handle
$msg = '服务器错误';
}
}
// 结束并设置响应头
header('Content-Type: application/json; charset=utf-8');
exit(json_encode(DataReturn($msg, $code)));
}