redis
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user