帝国CMS文章内容页怎么统计文章字数?(帝国CMS内容页统计文章字数的方法) 在使用帝国CMS程序建站的过程中,很多的网友经常问到一些问题,例如经常有些朋友问到帝国CMS文章内容页怎么统计文章字数呢?下面帝国cms模板网就针对这个问题,告诉大家帝国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 个字 OK!到这里就完成了,大家自行去测试吧!
|