• <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
  • <th id="l3qpx"><progress id="l3qpx"></progress></th>
      <th id="l3qpx"></th>
      <dd id="l3qpx"><font id="l3qpx"></font></dd>
      <th id="l3qpx"></th>
      0712-2888027 189-8648-0214
      微信公眾號(hào)

      孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號(hào)

      當(dāng)前位置:主頁(yè) > 技術(shù)支持 > PHPCMS > PHPCMS首頁(yè)調(diào)用最新文章與熱門(mén)文章示例代碼

      PHPCMS首頁(yè)調(diào)用最新文章與熱門(mén)文章示例代碼

      時(shí)間:2016-05-04來(lái)源:風(fēng)信官網(wǎng) 點(diǎn)擊: 1421次
      PHPCMS首頁(yè)調(diào)用最新文章與熱門(mén)文章示例代碼如下:

      最新文章

      {pc:get sql="S ELECT * FROM v9_news Order by id DESC " num="10"}
          {loop $data $r}
              <li>·<a href="{$r[url]}" target="_blank">{str_cut(strip_tags($r[title]),33)}</a></li>
          {/loop}
      {/pc}

      我們可以使用get標(biāo)簽,然后加上SQL語(yǔ)句,直接從表中獲取最新的10條數(shù)據(jù),num="10"你可以根據(jù)自己的需要指定數(shù)量。

      當(dāng)然,我們還可以把sql語(yǔ)句進(jìn)一步進(jìn)行擴(kuò)展

      熱門(mén)文章

      {pc:content action="hits" catid="$r[catid]" num="10" order="views DESC" cache="3600"}
          {loop $data $r}<li>·<a href="{$r[url]}" title="{$r[title]}" target="_blank">{str_cut(strip_tags($r[title]),33)}</a></li>
          {/loop}
      {/pc}

      這里的熱門(mén)文章,我們是利用的content里面的hits,然后調(diào)用數(shù)據(jù)出來(lái)。
      熱門(mén)關(guān)鍵詞: PHPCMS 首頁(yè) 最新文章 熱門(mén)文章
      欄目列表
      推薦內(nèi)容
      熱點(diǎn)內(nèi)容
      展開(kāi)
      欧美一区二区三区免费A级视频,亚洲精品中文字幕综合,动漫精品中文字幕无码第一页,1024亚洲国产综合 亚太影院 柯西贝尔-游戏赚网
    1. <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
    2. <th id="l3qpx"><progress id="l3qpx"></progress></th>
        <th id="l3qpx"></th>
        <dd id="l3qpx"><font id="l3qpx"></font></dd>
        <th id="l3qpx"></th>