帝國cms讀取遠(yuǎn)程頁面 (readhttp) 和 引用文件標(biāo)簽 (includefile)_帝國Cms教程
1、開啟標(biāo)簽 后臺(tái)--模板--標(biāo)簽--標(biāo)簽管理--修改(選擇對(duì)應(yīng)標(biāo)簽)--開啟
2、讀取遠(yuǎn)程頁面 (readhttp) [readhttp]'http://127.0.0.1/bbs//incfile/head.html'[/readhttp] 可以是本站的但是要寫絕對(duì)路徑
引用文件標(biāo)簽 (includefile)
include自定義頁面方法:(自定義頁面在后臺(tái)>"欄目">"自定義頁面"里增加)
include 自定義頁面有兩種方法(userpage.html在根目錄):
第一種:頁面生成.html文件情況下,
模板用<?php include(ECMS_PATH.'userpage.html');?>
或 [includefile]'../../page1.html"'[/includefile]
或 <?php require(ECMS_PATH.'userpage.html');?>
調(diào)用文件。
第二種:頁面生成.shtml文件,用<!--#include file="/userpage.html"-->調(diào)用文件。
技巧說明:
1、自定義頁面存放目錄說明:
<?php include(ECMS_PATH.'userpage.html');?>與<!--#include file="/userpage.html"-->
上面例子是以自定義頁面生成到根目錄為例,你也可以單獨(dú)建個(gè)自定義頁面存放目錄,比如:/incpage/ 目錄那模板include就是用:
<?php include(ECMS_PATH.'/incpage/userpage.html');?>與<!--#include file="/incpage/userpage.html"-->
2、自定義頁面可以設(shè)置定義生成,以讓文件內(nèi)容實(shí)時(shí)更新:
在后臺(tái)>"系統(tǒng)">"計(jì)劃任務(wù)">"管理刷新任務(wù)"里增加定時(shí)刷新自定義頁面。
3、如果是不同欄目不同自定義頁面如何引用?
(1)、增加自定義頁面按欄目ID命名,比如:/incpage/userpage1.html (其中1為欄目ID)
(2)、模板中include文件用:
<?php include(ECMS_PATH.'/incpage/userpage'.$GLOBALS[navclassid].'.html');?>
或
<?php require(ECMS_PATH.'/incpage/userpage'.$GLOBALS[navclassid].'.html');?>
或
<!--#include file="/incpage/userpage<?=$GLOBALS[navclassid]?>.html"-->
以上內(nèi)容僅供大家學(xué)習(xí)參考。希望對(duì)你有所幫助。
- 帝國cms內(nèi)容頁模板點(diǎn)擊量數(shù)值過萬時(shí),換成萬為單位
- 帝國cms JS登陸狀態(tài)模板中調(diào)用顯示會(huì)員收到的短消息數(shù)
- 帝國cms wap模板內(nèi)容頁調(diào)用上一篇 下一篇連接
- 不同時(shí)間顯示不同的廣告代碼
- 帝國cms驗(yàn)證碼說明
- 帝國使用[showtags]標(biāo)簽隨機(jī)顏色大小顯示tags方法
- 帝國cms靈動(dòng)標(biāo)簽同時(shí)調(diào)用頭條(1級(jí)、2級(jí))、推薦(1級(jí)、2級(jí))
- 帝國cms專題調(diào)用標(biāo)題-簡介-文章數(shù)-創(chuàng)建時(shí)間-瀏覽數(shù)
- 帝國cms后臺(tái)模型newstext字段設(shè)置編輯器高度
- 帝國cms常用的SQL語句
- 帝國CMS中[!--no.num--]標(biāo)簽的用法分析
- 帝國CMS結(jié)合項(xiàng)提示“您來自的鏈接不存在”的解決方法
- 相關(guān)鏈接:
復(fù)制本頁鏈接| 搜索帝國cms讀取遠(yuǎn)程頁面 (readhttp) 和 引用文件標(biāo)簽 (includefile)
- 教程說明:
帝國Cms教程-帝國cms讀取遠(yuǎn)程頁面 (readhttp) 和 引用文件標(biāo)簽 (includefile)。