迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費且不限制商業(yè)使用,是免費開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計理念,支持的微信公眾號、小程序、APP客戶端、移動端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
網(wǎng)站首頁如何調(diào)用總的hits,就是每個內(nèi)容頁的閱讀量總和
{php $ci->db->select_sum('hits');$row = $this->db->get('1_news')->row_array; echo $row['hits'];}
隨便寫的,效率不高,需要優(yōu)化一下
回復(fù)@誠接二開/定制/使用解答 報錯了大哥。
回復(fù)@誠接二開/定制/使用解答 我用的共享模塊
什么錯
回復(fù)@誠接二開/定制/使用解答An uncaught Exception was encounteredType: ErrorMessage: Call to a member function get() on nullFilename: /www/wwwroot/cache/templates/templates.pc.default.home.right.html.cache.phpLine Number: 21Backtrace:File: /www/wwwroot/cache/templates/templates.pc.default.home.index.html.cache.phpLine: 45Function: includeFile: /www/wwwroot/diy/dayrui/libraries/Template.phpLine: 234Function: includeFile: /www/wwwroot/diy/branch/fqb/D_Common.phpLine: 3006Function: displayFile: /www/wwwroot/diy/dayrui/controllers/Home.phpLine: 15Function: _indexcFile: /www/wwwroot/diy/Init.phpLine: 72Function: requireFile: /www/wwwroot/index.phpLine: 49Function: require
Type: Error
Message: Call to a member function get() on null
Filename: /www/wwwroot/cache/templates/templates.pc.default.home.right.html.cache.php
Line Number: 21
Backtrace:
File: /www/wwwroot/cache/templates/templates.pc.default.home.index.html.cache.phpLine: 45Function: include
File: /www/wwwroot/diy/dayrui/libraries/Template.phpLine: 234Function: include
File: /www/wwwroot/diy/branch/fqb/D_Common.phpLine: 3006Function: display
File: /www/wwwroot/diy/dayrui/controllers/Home.phpLine: 15Function: _indexc
File: /www/wwwroot/diy/Init.phpLine: 72Function: require
File: /www/wwwroot/index.phpLine: 49Function: require
回復(fù)@誠接二開/定制/使用解答老兄 能解決嗎?
this改成ci
回復(fù)@誠接二開/定制/使用解答
設(shè)為滿意答案
{php $ci->db->select_sum('hits');$row = $ci->db->get('1_news')->row_array; echo $row['hits'];}
數(shù)據(jù)不顯示了。。
老哥解決了沒 我也遇到這個問題
回復(fù)@辰和科技 都忘記了,之前好像沒有調(diào)用出來 然后就換了模板了好像是 你不然就發(fā)一個問題 看大神的回復(fù)
回復(fù)@菜狗 啊我搞好了 其實用自帶的標(biāo)簽就可以統(tǒng)計了 哈哈哈我發(fā)完才看到這都是18年的問題了,感謝回復(fù)
回復(fù)@辰和科技 咋解決的呀?
回復(fù)@菜狗
{$q=0}
{hits module=MOD_DIR catid=0}
<span style="display:none">{$q=$q+$t.hits}</span>
{/hits}
{$q}
q的結(jié)果就是所有文章訪問量總和
隨便寫的,效率不高,需要優(yōu)化一下
回復(fù)@誠接二開/定制/使用解答 報錯了大哥。
回復(fù)@誠接二開/定制/使用解答 報錯了大哥。
回復(fù)@誠接二開/定制/使用解答 我用的共享模塊
什么錯
回復(fù)@誠接二開/定制/使用解答 報錯了大哥。
回復(fù)@誠接二開/定制/使用解答 我用的共享模塊
回復(fù)@誠接二開/定制/使用解答
An uncaught Exception was encountered
Type: Error
Message: Call to a member function get() on null
Filename: /www/wwwroot/cache/templates/templates.pc.default.home.right.html.cache.php
Line Number: 21
Backtrace:
File: /www/wwwroot/cache/templates/templates.pc.default.home.index.html.cache.php
Line: 45
Function: include
File: /www/wwwroot/diy/dayrui/libraries/Template.php
Line: 234
Function: include
File: /www/wwwroot/diy/branch/fqb/D_Common.php
Line: 3006
Function: display
File: /www/wwwroot/diy/dayrui/controllers/Home.php
Line: 15
Function: _indexc
File: /www/wwwroot/diy/Init.php
Line: 72
Function: require
File: /www/wwwroot/index.php
Line: 49
Function: require
回復(fù)@誠接二開/定制/使用解答老兄 能解決嗎?
this改成ci
回復(fù)@誠接二開/定制/使用解答
設(shè)為滿意答案
數(shù)據(jù)不顯示了。。
老哥解決了沒 我也遇到這個問題
回復(fù)@辰和科技 都忘記了,之前好像沒有調(diào)用出來 然后就換了模板了好像是 你不然就發(fā)一個問題 看大神的回復(fù)
回復(fù)@菜狗 啊我搞好了 其實用自帶的標(biāo)簽就可以統(tǒng)計了 哈哈哈我發(fā)完才看到這都是18年的問題了,感謝回復(fù)
回復(fù)@辰和科技 咋解決的呀?
回復(fù)@菜狗
{$q=0}
{hits module=MOD_DIR catid=0}
<span style="display:none">{$q=$q+$t.hits}</span>
{/hits}
{$q}
q的結(jié)果就是所有文章訪問量總和