php自定义函数替换超长文本中的特殊字符_PHP教程
程序员文章站
2022-04-08 13:08:16
...
function unhtml($content){
$content=htmlspecialchars($content);
$content=str_replace(chr(13),"
",$content);
$content=str_replace(chr(32),"
",$content);
$content=str_replace("[_["," $content=str_relace(")_)",">",$content);
$content=str_replace("|_|","",$content);
rerurn trim($content);
$content=htmlspecialchars($content);
$content=str_replace(chr(13),"
",$content);
$content=str_replace(chr(32),"
",$content);
$content=str_replace("[_["," $content=str_relace(")_)",">",$content);
$content=str_replace("|_|","",$content);
rerurn trim($content);
}
摘自 ms.元
上一篇: PHP异常处理Exception类