This commit is contained in:
2025-10-17 15:39:51 +08:00
parent 67d912fe49
commit 70be9f3275
5 changed files with 41 additions and 12 deletions

View File

@@ -136,6 +136,32 @@ if (!function_exists('handldollerstr')) {
}
}
// 处理${}字符串
if (!function_exists('saveJson_arr')) {
function saveJson_arr($th_json, $cont_json, $user)
{
$th_json_arr = json_decode($th_json, true);
$cont_json_arr = json_decode($cont_json, true);
$new_arr = [];
foreach ($th_json_arr as $k => $v) {
foreach ($cont_json_arr as $k1 => $v1) {
if($k == $v1) {
if($k1 == 'username') {
$new_arr[$k1] = $user['nick_name'];
}else {
$new_arr[$k1] = $v;
}
}
}
}
return $new_arr;
}
}
if (!function_exists('replace_placeholder_keys')) {
function replace_placeholder_keys($str, $replaceArray)
{