/**
* 转换HTML代码函数
*
* @param unknown_type $content
* @param unknown_type $wrap 是否换行
*/
function htmlClean($content, $nl2br = true) {
$content = htmlspecialchars($content, ENT_QUOTES, 'UTF-8');
if ($nl2br) {
$content = nl2br($content);
}
$content = str_replace(' ', ' ', $content);
$content = str_replace("\t", ' ', $content);
return $content;
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询