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

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);

}

摘自 ms.元

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478227.htmlTechArticlefunction unhtml($content){ $content=htmlspecialchars($content); $content=str_replace(chr(13),br,$content); $content=str_replace(chr(32),br,$content); $content=str_replace([_[,,$con...