把下面这个代码放在 e/class/userfun.php 里面
//阅读时间functioncount_words_read_time(){global$navinfor;$text_num=mb_strlen(htmlspecialchars(strip_tags(str_replace(' ','',str_replace('“','',str_replace('”','',str_replace(egetzy('rn'),'',str_replace(egetzy('<br/>'),'',$navinfor[newstext]))))))),'utf-8');$read_time=ceil($text_num/300);//修改数字300调整时间$output.='本文共计'.$text_num.'个字,预计阅读时长'.$read_time.'分钟。';return$output;}调用代码:
<?phpechocount_words_read_time();?>
利用jQuery实现 点击阅读 全文查看 文章代码。利用jQuery实现点击阅读全文查看文章代码
上一篇:帝国cms 7.5 打开后台显示空白的原因和解决方案
下一篇:帝国cms 提取专题id专题名
代码 时间 放在









