欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

php自定义函数替换超长文本中的特殊字符

程序员文章站 2022-04-07 17:10:57
...
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);

}

摘自 ms.元