function ubbfirebox($Text) { /// UBB过滤掉
$Text=preg_replace("/\[br\]/is","",$Text);
$Text=preg_replace("/\\t/is","",$Text);
$Text=preg_replace("/\[url\](http:\/\/.+?)\[\/url\]/is","<a href=\"\\1\" target=\"new\"><u>\\1</u></a>",$Text);
$Text=preg_replace("/\[url\](.+?)\[\/url\]/is","<a href=\"http://\\1\" target=\"new\"><u>\\1</u></a>",$Text);
$Text=preg_replace("/\[url=(http:\/\/.+?)\](.+?)\[\/url\]/is","<a href=\"\\1\" target=\"new\"><u>\\2</u></a>",$Text);
$Text=preg_replace("/\[url=(.+?)\](.+?)\[\/url\]/is","<a href=\"http://\\1\" target=\"new\"><u>\\2</u></a>",$Text);
$Text=preg_replace('/\[attach](.+?)\[\/attach\]/is', '', $Text);
$Text=preg_replace('/\[img](.+?)\[\/img\]/is', '', $Text);
$Text=preg_replace('/\[size](.+?)\[\/size\]/is', '', $Text);
$Text=preg_replace("/\s+/", " ", $Text); //过滤多余回车
return $Text;
}
这是我用到的,希望能帮助到您
阅读全文
收起全文