Alex的博客

本博客的文章均为原创,是本人从事行业多年来所遇见一些小问题的解决心得,希望可以帮助到大家!



PHP 去html样式

<?php
public function($da){
$res=str_replace(array("\r\n", "\r", "\n","&amp;","nbsp;"," ","mdash;","rdquo;","ldquo;","hellip;","middot;","quot;","amp;"),"",htmlspecialchars(strip_tags($da))));
return $res;
}
?>

浏览432  评论0  Alex于 2016-12-30 10:36
发言