<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                **content內容標簽** 標簽:`<content></content>` 作用:內容模型相關標簽,可調用欄目,列表等常用信息 用法示例:`<content action="lists" catid="$catid" order="id DESC" num="4" page="$page"> .. HTML ..</content>` 格式:`<content action="方法名" 參數="內容"> .. HTML ..</content>` `特別說明:` > `$catid` 變量在列表頁,和內容頁都表示當前欄目ID。 `page="$page"` 表示開啟分頁,每個頁面,只允許出現`一`個,多個會出現未知錯誤! content 標簽返回的是`數組`,所以要配合`volist標簽`使用,具體看手冊基本語法! [TOC] ##基本參數 | 參數名稱 | 說明 | | -- | -- | | @action | 調用方法(必填) | | @page | 當前分頁號,默認$page,當傳入該參數表示啟用分頁,一個頁面只允許有一個page,多個標簽使用多個page會造成不可預知的問題。 | | @num | 每次返回數據量。 | | @catid| 欄目id(必填),列表頁,內容頁可以使用 $catid 獲取當前欄目。| ##公用參數 | 參數名稱 | 說明 | | -- | -- | | @cache | 數據緩存時間,單位秒 | |@return|返回值變量名稱,默認data| |@pagefun|分頁函數,默認page()| |@pagetp|分頁模板| |@where|設置SQL where 部分。<br/>說明:出現“`>`”,“`<`”這類,建議使用`{gt}`代替`>`,`{lt}`代替`<`,`{neq}`代替`<>`,`{elt}`代替`<=`,`{egt}`代替`>=`。<br/> 建議直接`傳入變量`。| **`下面的參數,是根據@action參數不同,而獨有的`** * * * * * ##調用欄目信息列表 當`@action`為`lists`時,調用欄目信息列表 用法示例:`<content action="lists" catid="$catid" order="id DESC" num="4" page="$page"> .. HTML ..</content>` | 參數名稱 | 說明 | | -- | -- | |@order|排序,例如“id DESC”| |@where|sql語句的where部分 例如:` thumb != '' AND status = 99 `| |@thumb|是否僅必須縮略圖,1為調用帶縮略圖的| |@moreinfo|是否調用副表數據 1為是| |@output|是否經過ContentOutput處理,例如時間,在除了內容頁其他調用,是一串數字,開啟這個后就是直接輸出日期了。同時,如果開啟這個參數后,會增加一個_original參數,可以訪問數據庫存儲的原始內容,例如 `$vo['_original']['id']`| 用法示例: ~~~ <content?action="lists"?catid="$catid"??order="id?DESC"?num="4"?page="$page"> 循環列表,默認返回數據是$data <ul> <volist?name="data"?id="vo"> ????<li>標題:{$vo.title},地址:{$vo.url}</li> </volist> </ul> </content> ~~~ ##調用點擊排行榜 當`@action`為`hits`時,調用點擊排行榜 用法格式:`<content action="hits" catid="$catid" order="weekviews DESC" num="10"> .. HTML ..</content>` | 參數名稱 | 說明 | | -- | -- | |@order|排序,例如“weekviews DESC”| |@day|調用多少天內的排行| |@where|sql語句的where部分。<br/>`views` 點擊總數<br/>`yesterdayviews` 昨日點擊<br/>`dayviews` 今日點擊<br/>`weekviews` 本周點擊<br/>`monthviews` 本月點擊| 用法示例: ~~~ <content?action="hits"?catid="$catid"??order="weekviews?DESC"?num="10"> 循環列表,默認返回數據是$data <ul> <volist?name="data"?id="vo"> ????<li>標題:{$vo.title},地址:{$vo.url}</li> </volist> </ul> </content> ~~~ ##調用相關文章 當`@action`為`relation`時,調用相關文章 用法格式:`<content action="relation" relation="$relation" catid="$catid" order="id DESC" num="5" keywords="$keywords"> .. HTML ..</content>` | 參數名稱 | 說明 | | -- | -- | |@nid|排除id 一般是 $id,排除當前文章| |@keywords|內容頁面取值:$keywords,也就是關鍵字| |@relation|內容頁取值$relation,當有$relation時keywords參數失效| |@where|sql語句的where部分| 用法示例: ~~~ <content?action="relation"?relation="$relation"?catid="$catid"??order="id?DESC"?num="5"?keywords="$keywords"> 循環列表,默認返回數據是$data <ul> <volist?name="data"?id="vo"> ????<li>標題:{$vo.title},地址:{$vo.url}</li> </volist> </ul> </content> ~~~ ##調用欄目列表 當`@action`為`category`時,調用欄目列表 用法格式:`<content action="category" catid="$catid" order="listorder ASC" > .. HTML ..</content>` | 參數名稱 | 說明 | | -- | -- | |@order|排序,例如“listorder DESC”| |@where|sql語句的where部分 例如:` child = 0`| 用法示例: ~~~ <content?action="category"?catid="$catid"??order="listorder?ASC"?> 循環列表,默認返回數據是$data <ul> <volist?name="data"?id="vo"> ????<li>欄目標題:{$vo.catname},地址:{$vo.url}</li> </volist> </ul> </content> ~~~ ##其他一些小技巧 1. 如果要添加where條件,可以這樣使用 `where="field='8'"`,如果想在where里調用變量,要使用`<?php $sql = "field = '{$id}'"; ?> where="$sql"` 這種方式,不可以直接在where里使用變量!(`注意:為了你的網站安全,不建議直接接受$_GET,$_POST等不可信數據!`) 2. 如果為了性能考慮,可以添加 `cache="3600"` 參數,標識緩存3600秒。這樣在動態訪問的時候,可以加快!推薦網站開啟Memcached緩存。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看