当前位置:网站首页>Tp6 interface returns three elements

Tp6 interface returns three elements

2022-06-25 06:38:00 Python's path to becoming a God

app/common.php


// The correct value returns three elements 
public function correct($code, $msg, $data = [''])
{
    return json_encode(['code' => $code, 'msg' => $msg, 'data' => $data]);
}

// Error value return three elements 
public function error($code, $msg, $data = [''])
{
    return json_encode(['code' => $code, 'msg' => $msg, 'data' => $data]);
}

原网站

版权声明
本文为[Python's path to becoming a God]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202201234083464.html