我不知道此函数的返回结果……非常感谢!
function convert_links($string, $base) {
$pattern = array(',<(a|link|img|script|form|td)([^>]+)(href|src|action|background)="([^>"\s]+)",ie',
',<(a|link|img|script|form|td)([^>]+)(href|src|action|background)=([^>"\s]+),ie',
',<style(.+)url\("([^>"\s]+)",ie');
$replace = array('"<\1\2\3=\"" . absolute_link("\4", $base,"1 \1") . "\""',
'"<\1\2\3=\"" . absolute_link("\4", $base,"2 \1") . "\""',
'"<style\lurl(\"" . absolute_link("\2", $base) . "\""');
return preg_replace($pattern, $replace, $string);