论坛的IMG 功能是怎么实现的,能否给出代码?
来源:百度知道 编辑:UC知道 时间:2024/06/09 16:53:29
[img][/img]标示替换成html代码
$code = preg_replace("/\[img\](\r\n|\r|\n)*((http|https):\/\/([^;<>\(\)\"".iif($allowdynimg,"","\*\?\&")."]+)|[a-z0-9\/\\\._\- ]+)\[\/img\]/siU", "<img src=\"\\2\" border=\"0\" alt=\"\">", $code);