phpcms v9文章点击数是哪个表哪个字段
phpcms v9文章点击数是哪个表哪个字段
phpcms v9文章点击数在hits表的views字段。
详解:
获取点击数的实例
{pc:content action="lists"catid="$catid"num="25"order="id DESC"page="$page"moreinfo="1"}{loop $data $r}{php $db=pc_base::load_model(hits_model);$_r=$db->get_one(array(hitsid=>c-.$modelid.-.$r[id]));$views=$_r618次浏览;}{php $comment_tag=pc_base::load_app_class("comment_tag","comment");$comment_total=$comment_tag->count(array(commentid=>content_.$catid.-.$r[id].-.$modelid));}<spanclass="rt">{date(Y-m-d H:i:s,$r[inputtime])}</span>·{$r[title]}