|
...
|
...
|
@@ -263,19 +263,19 @@ class LoginController extends BaseController |
|
|
|
$lists = $templateModel->list();
|
|
|
|
foreach ($lists as $k => $v){
|
|
|
|
// 使用正则表达式和 preg_match_all 函数来匹配多个 img 标签的 src 值
|
|
|
|
preg_match_all('/\"https:\/\/develop.globalso.com\/a\/image\/(.*?)\"/', $v['html'], $matches);
|
|
|
|
preg_match_all('/\"https:\/\/admin.item.globalso.site\/a\/image\/(.*?)\"/', $v['html'], $matches);
|
|
|
|
if (!empty($matches[1])) {
|
|
|
|
$srcValues = $matches[1];
|
|
|
|
var_dump($srcValues);
|
|
|
|
die();
|
|
|
|
$imageModel = new Image();
|
|
|
|
foreach ($srcValues as $srcValue) {
|
|
|
|
var_dump($srcValue);
|
|
|
|
die();
|
|
|
|
$hash = basename($srcValue);
|
|
|
|
$image_info = $imageModel->read(['hash'=>$hash]);
|
|
|
|
if($image_info !== false){
|
|
|
|
$path = basename($image_info['path']);
|
|
|
|
$data['html'] = str_replace(
|
|
|
|
$hash,
|
|
|
|
'/a/image/'.$hash,
|
|
|
|
$path,
|
|
|
|
$v['html']
|
|
|
|
);
|
...
|
...
|
|