帝国CMS模板文章内容页怎么统计文章字数
2022-06-17
帝国CMS模板内容页统计文章字数的方法,下面一起来看看怎么样实现吧!
<?=strlen($navinfor[newstext])?>
统计:8022 个字
<?=strlen(strip_tags($navinfor[newstext]))?>
加上过滤后,统计:1559 个字
<?=strlen(htmlspecialchars(strip_tags(str_replace(' ','',str_replace('“','',str_replace('”','',$navinfor[newstext]))))))?>
加上空格等过滤后,统计:1217 个字
<?=strlen(htmlspecialchars(strip_tags(str_replace(' ','',str_replace('“','',str_replace('”','',str_replace(egetzy('rn'),'',str_replace(egetzy('<br />'),'',$navinfor[newstext]))))))))?>
加上空格等+html标签等过滤后,统计:1141 个字
声明:模库网 (www.mokuw.com) 内容来自分享和网络收集,仅供学习与参考测试请备份。 转载请注明本文地址,如有侵权请联系我们!
本文地址:/study/412.html
本文标题:帝国CMS模板文章内容页怎么统计文章字数


