作者 lyh

hx

@@ -35,7 +35,7 @@ class TestController extends BaseController @@ -35,7 +35,7 @@ class TestController extends BaseController
35 $pattern = '/<img\s+[^>]*src=["\']([^"\']+)["\']/i'; 35 $pattern = '/<img\s+[^>]*src=["\']([^"\']+)["\']/i';
36 $matches = []; 36 $matches = [];
37 // Use preg_match_all to find all src attributes 37 // Use preg_match_all to find all src attributes
38 - preg_match_all($pattern, $inputString, $matches); 38 + preg_match_all($pattern, $test, $matches);
39 39
40 // Return an array of all src URLs found 40 // Return an array of all src URLs found
41 return $matches[1]; 41 return $matches[1];