文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>清除字符串中的非普通字符标记函数

清除字符串中的非普通字符标记函数

时间:2010-04-19  来源:xhq6632

/*去掉字符中全部其他标记*/
function html2txt($document){
 $search = array(
  '@<script[^>]*?>.*?</script>@si',  // Strip out javascript
  '@<style[^>]*?>.*?</style>@siU',    // Strip style tags properly
  '@<[\/\!]*?[^<>]*?>@si',            // Strip out HTML tags
  '@<![\s\S]*?--[ \t\n\r]*>@'        // Strip multi-line comments ncluding CDATA
 );
 $text = preg_replace($search, '', $document);
return $text;
}
相关阅读 更多 +
排行榜 更多 +
箱庭铁道物语手游下载

箱庭铁道物语手游下载

模拟经营 下载
植物大战僵尸诸神版手机版下载

植物大战僵尸诸神版手机版下载

策略塔防 下载
富甲天下3手机版中文版下载

富甲天下3手机版中文版下载

模拟经营 下载