-->

帝国cms模板读取远程页面内容错误(帝国cms模板读取远程页面内容)

1、打开标签后端--模板--标签--标签管理--修改(选择对应标签)--打开

2.读取远程页面(readhttp) [readhttp]'http://127.0.0.1/bbs//incfile/head.html'[/readhttp] 可以从本站读取但是需要写绝对路径引用文件标签(includefile) ---- ---------------------------------------------------------- ---- ---------------------------------------------------------- ---- ----------------------------------包含自定义页面方法:(自定义页面在背景“栏目”“自定义页面”增加“)

包含自定义页面有两种方式(userpage.html在根目录): 第一种:页面生成.html文件时,模板使用php include(ECMS_PATH.'userpage.html');或[includefile]' ././page1.html''[/includefile] 或php require(ECMS_PATH.'userpage.html'); 或?=sys_includefile('././page1.html ')?调用文件。

第二种:页面生成.shtml文件,使用!--#include file='/userpage.html'--调用该文件。

Tips: 1.自定义页面存放目录说明:php include(ECMS_PATH.'userpage.html');and!--#include file='/userpage.html'--上面的例子是从自定义页面生成的Go以根目录为例。您还可以创建单独的自定义页面存储目录,例如:/incpage/目录。然后使用模板include:php include(ECMS_PATH.'/incpage/userpage.html');and!- -#include file='/incpage/userpage.html'--

2.自定义页面可以设置生成定义,以便文件内容实时更新:在后台“系统”、“计划任务”和“管理刷新任务”中添加自定义页面的定时刷新。

3、如何在不同栏目引用不同的自定义页面? (1).添加根据列ID命名的自定义页面,例如:/incpage/userpage1.html(1为列ID)(2)。使用模板中的包含文件:php include(ECMS_PATH.'/incpage/userpage' .$GLOBALS[navclassid].'.html');或?php require(ECMS_PATH.'/incpage/userpage'.$GLOBALS [navclassid].'.html');or!--#include file=' /incpage/userpage?=$GLOBALS[navclassid]?html'--

上一篇: 帝国cms标签调用大全(帝国cms标签模板)

下一篇: 帝国cms二次开发基本问题有哪些内容(帝国cms二次开发基本问题有哪些)

关于搜一搜站长工具

如未标明出处,所有模板均为搜一搜站长工具原创,如需转载,请附上原文地址,感谢您的支持和关注。

关于代售类模板,为网友上传发布,如果有侵犯你的权益,请联系我们,第一时间删除。客服邮箱:3801085100#qq.com(#换成@)

本文地址:http://www.soyiso.net/news/12004.html

展开更多