作者 lyh

gx

... ... @@ -123,6 +123,18 @@ class LoginController extends BaseController
$templateModel = new Template();
$list = $templateModel->list();
foreach ($list as $k => $v){
// 使用正则表达式和 preg_match_all 函数来匹配多个 img 标签的 src 值
preg_match_all('/<img src="([^"]+)"/', $v['html'], $matches);
if (!empty($matches[1])) {
$srcValues = $matches[1];
var_dump($srcValues);
die();
foreach ($srcValues as $srcValue) {
echo $srcValue . "<br>";
}
} else {
echo "未找到 img 标签的 src 值";
}
$data['html'] = str_replace(
'https://develop.globalso.com/a/image/',
'https://ecdn6.globalso.com/public/template/',
... ...