Phpcms v9 完成主页

2021-04-04 12:10

许多朋友常常问Phpcms v9的、目录页、內容页点一下量怎样启用。今日给大伙儿共享phpcms V9怎样各自在、目录页、內容页启用点一下量编码 1,Phpcms v9启用点一下量
 {pc:content action="lists" catid="$r[catid]" num="5" order="id DESC" return="info"} 
 {php $categorys = getcache('category_content_'.$siteid,'commons');} 
 {loop $info $v} 
 {php $category = $categorys[$v[catid]];} 
 {php $modelid = $category['modelid'];} 
 {php $db = pc_base::load_model('hits_model'); $_r = $db- get_one(array('hitsid'= 'c-'.$modelid.'-'.$v[id])); $views = $_r[views]; } 
 {php $comment_tag = pc_base::load_app_class("comment_tag", "comment"); $comment_total = $comment_tag- count(array('commentid'= 'content_'.$v[catid].'-'.$v[id].'-'.$modelid));} 
 li · a href="{$v['url']}" target="_blank" title="{$v['title']}"{title_style($v[style])} {str_cut($v['title'],40)} /a 点一下:{$views} 评价:{if $comment_total}{$comment_total}{else}0{/if} /li 
 {/loop} 
 /ul 
 {/pc} 
2,Phpcms v9目录页读取点一下量
 {php $db = pc_base::load_model(‘hits_model’); $_r = $db- get_one(array(‘hitsid’= ’c-’.$modelid.’-’.$r[id])); $views = $_r[views]; } 
 点一下:{$views} 
3, Phpcms v9內容页读取点一下量
 script type="text/javascript" src="{JS_PATH}jquery.min.js" /script 
 /span span id="hits" script language="JavaScript" src="{APP_PATH}api.php?op=count id={$id} modelid={$modelid}" /script /span 
 
Samueldinue :25 回应TA

>Nkfhofjeojfoegoero ogeoegfeougeihigoohge igjeigheiogheiogheih giehdgoiehifoehgioheighe hfioeehfieohgeiodgnei hioehgioehfdkhgioehgi eodghioedhgieghiehgeuo Nihdigheifjojfieui iihfishfiwsfhiwhfowhfh djkfhe klchsiofhwifhdvjdnj hkfhsfhifheuhguegheflkhe Yfhsfheifhei hfhdfiehfiejfk fjeogjeogj ojgoedjodjvsclksfhszghLhekjb; ;dh jdjvndkjdfjsofjsofjosjfi fojsjdoskfsjfodgjdsghoi sdjfpfgspegjsodjvdhvgisd Mfjefjojgidhvshg ihidhgiodhgirhgir hioihgdioghrigrigh ihgiogherihgirodvdks jsdjfsopejfovgjdksjosj joesjfoesjfsj;ifsjg Ndjsfhjifekfhekdghior highdiofhidogheioghei gijhgoiehgiehgieh jfiheigheihgioe


新疆省SEO笑靥的blog共享全新,最合理的新疆省seo营销推广实例教程、seo提升计划方案、seoseo优化,而且出示对各制造行业客户订制要求营销推广、程序制作开发设计,在其中包括的有:后端开发开发设计【PHP,JAVA,C#,.NET】,前端开发开发设计【Html5,JavaScript,css3,vue+react】,android【安卓系统开发设计】,ios【iPhone开发设计】负荷布署,网站安全性检验,程序bug修补等详询::Tel:


扫描二维码分享到微信

在线咨询
联系电话

020-66889888