php替换富文本框返回图片路径
public function imageUrl($content) {
$url = "http://".$_SERVER['SERVER_NAME'];
$pregRule = "/<[img|IMG].*?src=[\'|\"](.*?(?:[\.jpg|\.jpeg|\.png|\.gif|\.bmp]))[\'|\"].*?[\/]?>/";
$content = preg_replace($pregRule, '<img src="'.$url.'${1}" style="max-width:100%">', $content);
return $content;
}