底层代码优化及用户管理

This commit is contained in:
Ghost
2025-03-29 17:01:56 +08:00
parent a734ae2864
commit 6ec2ceefc5
9 changed files with 155 additions and 16 deletions

View File

@@ -467,4 +467,35 @@ if (!function_exists('getUserAction')) {
'QUERY' => '查询'
];
}
}
}
if (!function_exists('exit_data')) {
/**
* 截断输出
* @param array $data
* @param string $type
* @param bool $exit
*/
function exit_data($data = [], $type = 'pr', $exit = true)
{
switch ($type) {
case 'pr':
$func = 'print_r';
break;
case 'vd':
$func = 'var_dump';
break;
default:
$func = 'print_r';
break;
}
if ($func == 'print_r') {
echo '<pre>';
}
call_user_func($func, $data);
if ($exit)
exit();
}
}