国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 帝國Empire > 正文

帝國CMS模板讀取遠程頁面內(nèi)容(readhttp) 和引用文件標簽 (includefile)的用法

2024-08-28 12:26:11
字體:
來源:轉載
供稿:網(wǎng)友

1、開啟標簽   后臺--模板--標簽--標簽管理--修改(選擇對應標簽)--開啟

2、讀取遠程頁面 (readhttp)   [readhttp]'http://127.0.0.1/bbs//incfile/head.html'[/readhttp]  可以是本站的但是要寫絕對路徑
    引用文件標簽 (includefile)
---------------------------------------------------------------------------------------------------------------------------------------
include自定義頁面方法:(自定義頁面在后臺>“欄目”>“自定義頁面”里增加)

include 自定義頁面有兩種方法(userpage.html在根目錄):
第一種:頁面生成.html文件情況下,
模板用<?php include(ECMS_PATH.'userpage.html');?> 
或 [includefile]'../../page1.html"'[/includefile]
或 <?php require(ECMS_PATH.'userpage.html');?> 
或 <?=sys_includefile('../../page1.html')?>
調(diào)用文件。

第二種:頁面生成.shtml文件,用<!--#include file="/userpage.html"-->調(diào)用文件。

技巧說明:
1、自定義頁面存放目錄說明:
<?php include(ECMS_PATH.'userpage.html');?>與<!--#include file="/userpage.html"-->
上面例子是以自定義頁面生成到根目錄為例,你也可以單獨建個自定義頁面存放目錄,比如:/incpage/ 目錄那模板include就是用:
<?php include(ECMS_PATH.'/incpage/userpage.html');?>與<!--#include file="/incpage/userpage.html"-->

2、自定義頁面可以設置定義生成,以讓文件內(nèi)容實時更新:
在后臺>“系統(tǒng)”>“計劃任務”>“管理刷新任務”里增加定時刷新自定義頁面。

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"-->

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 祁连县| 香格里拉县| 财经| 锡林郭勒盟| 盐池县| 西林县| 英吉沙县| 永吉县| 三原县| 郑州市| 梧州市| 广平县| 洞头县| 榆林市| 房产| 搜索| 客服| 凤凰县| 桑植县| 沈丘县| 兖州市| 彭山县| 东海县| 平罗县| 郸城县| 绵阳市| 吉林省| 册亨县| 澎湖县| 宁化县| 昌都县| 萨嘎县| 江孜县| 潢川县| 恩施市| 关岭| 浦江县| 贵定县| 赤城县| 莲花县| 靖宇县|