PHP adds a domain name to the image in the editor
?
/** * Replace picture in Fckedit add domain name * @param string $content What to replace * @param string $STRURL The name of the picture to add @return String * @eg */f Unction Replacepicurl ($content = null, $STRURL = null) {if ($STRURL) {//extract the regular expression of the src of the picture path and deposit the result in $matches preg_match_a LL ("/]+>/isu", $content, $matches); $img = ""; if (!empty ($matches)) {//Note that the above regular expression indicates that the value of SRC is placed in the third of the array $img = $matches [2]; }else {$img = ""; } if (!empty ($img)) {$patterns = array (); $replacements = Array (); foreach ($img as $imgItem) {$final _imgurl = $strUrl. $imgItem; $replacements [] = $final _imgurl; $img _new = "/". Preg_replace ("/\//i", "\ \", $imgItem). " /"; $patterns [] = $img _new; }//Let the array sort by key ksort ($patterns); Ksort ($replacements); Replace content $vote _content = Preg_Replace ($patterns, $replacements, $content); return $vote _content;} else {return $content;} } else {return $content;}}