master
cody 5 months ago
parent 3a7140812e
commit 46c928f996

@ -696,5 +696,9 @@ function getVar($text)
{ {
$pattern = '/\{.*?\}/'; $pattern = '/\{.*?\}/';
preg_match_all($pattern, $text, $matches); preg_match_all($pattern, $text, $matches);
return $matches[0] ?? ''; if (count($matches[0]) > 0) {
// 数组转英文逗号分割的字符串
return implode(',', $matches[0]);
}
return '';
} }

Loading…
Cancel
Save