模块调取的论坛数据,详细内容相关字符怎么过滤!

源码技巧15年前 (2010-08-18)14100
[code]function texthtml($str){
$str = str_replace(" ","",$str);
$str = str_replace(" ","",$str);
$str = str_replace("[attach]","",$str);
$str = str_replace("[/attach]","",$str);
$str = str_replace("[","<",$str);
$str = str_replace("]","/>",$str);
$str = str_replace(" ","",$str);
$str = preg_replace("/<.+?>/i","",$str);
$str = preg_replace("/[rn]{1,}/isU","
rn",$str);
return $str;
}
此函数放到 function 文件夹下的 common.func.php 里面
调用信息的 时候 {eval echo(texthtml($value[log_Content]));}[/code]

“模块调取的论坛数据,详细内容相关字符怎么过滤!” 的相关文章

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。