1
This commit is contained in:
parent
b14416766d
commit
1955b3ed9c
@ -92,3 +92,25 @@ function getConfigBaseDir()
|
|||||||
{
|
{
|
||||||
return '../res/';
|
return '../res/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function new_sendError($errcode, $errmsg_tid, $errmsg)
|
||||||
|
{
|
||||||
|
$filename = getConfigBaseDir() . 'text@text.php';
|
||||||
|
if (file_exists($filename)) {
|
||||||
|
$g_text_table = require($filename);
|
||||||
|
foreach ($g_text_table as $conf) {
|
||||||
|
if ($conf['textid'] == $errmsg_tid) {
|
||||||
|
$errmsg = $conf['text'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($errmsg)) {
|
||||||
|
$errmsg = $errmsg_tid;
|
||||||
|
}
|
||||||
|
echo json_encode(array(
|
||||||
|
'errcode' => $errcode,
|
||||||
|
'errmsg' => $errmsg,
|
||||||
|
'errmsg_tid' => $errmsg_tid
|
||||||
|
));
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user