当前位置:Gxlcms > PHP教程 > php自定义函数替换超长文本中的特殊字符_PHP教程

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

时间:2021-07-01 10:21:17 帮助过:3人阅读

function unhtml($content){
$content=htmlspecialchars($content);
$content=str_replace(chr(13),"
",$content);
$content=str_replace(chr(32),"
",$content);
$content=str_replace("[_[","<",$content);
$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...

人气教程排行