帝国cms内容页文章字数统计

admin 2024年1月19日13:45:12帝国cms技巧评论1,172 次浏览阅读模式

内容摘要

1、<?=strlen($navinfor[newstext])?>统计:8022 个字2、<?=strlen(strip_tags($navinfor[newstext]))?>加上过滤后统计:1559 个字3、<?=strlen(htmlspecialchars(strip_tags(s

文章正文

1、

<?=strlen($navinfor[newstext])?>

统计:8022 个字

2、

<?=strlen(strip_tags($navinfor[newstext]))?>

加上过滤后

统计:1559 个字

3、

<?=strlen(htmlspecialchars(strip_tags(str_replace('&nbsp;','',str_replace('&ldquo;','',str_replace('&rdquo;','',$navinfor[newstext]))))))?>

加上空格等过滤后

统计:1217 个字

4、

<?=strlen(htmlspecialchars(strip_tags(str_replace('&nbsp;','',str_replace('&ldquo;','',str_replace('&rdquo;','',str_replace(egetzy('rn'),'',str_replace(egetzy('<br />'),'',$navinfor[newstext]))))))))?>

加上空格等+html标签等过滤后

统计:1141 个字

代码注释

相关文章
weinxin
我的微信
微信扫一扫
admin
  • 本文由 发表于 2024年1月19日13:45:12
  • 转载请务必保留本文链接:https://anyun.org/a/webtips/ecmstips/2024/0119/17756.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: