php替换富文本框返回图片路径

public function imageUrl($content) {
    $url = "http://".$_SERVER[‘SERVER_NAME‘];
    $pregRule = "/<[img|IMG].*?src=[\‘|\"](.*?(?:[\.jpg|\.jpeg|\.png|\.gif|\.bmp]))[\‘|\"].*?[\/]?>/";
    $list = preg_replace($pregRule, ‘‘, $content);
    return $list;
}

你可能感兴趣的:(php替换富文本框返回图片路径)