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[message]));} |