$text1 =
'
123345
http://img.gxlcms.com/
http://img.gxlcms.com/
http://img.gxlcms.com/
http://img.gxlcms.com/
';
$test2 = '
我用了$pattern = '/
------解决方案--------------------
$pattern = '/$pattern = '#
str_replace('src="/','src="http://www.qq.com/',$text1);