+ 收藏我们

网站模板

网站模板搜索
404模板 营销型模板 外贸网站模板 单页模板 双语模板 标签大全
电话:18630701785
首页 > 站长学院 > 帝国CMS自动更新刷新首页,自定义列表页教程 >

帝国CMS自动更新刷新首页,自定义列表页教程

时间:2024-07-30 11:10:01

在e/下面新建文件夹htmlindex(可自己命名),在htmlindex下创建index_html.php(可自行命名,文件以.php结尾)文件

  1. <?php
  2. require("../class/connect.php");
  3. include("../class/db_sql.php");
  4. include("../class/config.php");
  5. include("../class/functions.php");
  6. include("../class/t_functions.php");
  7. require LoadLang("pub/fun.php");
  8. require("../data/dbcache/class.php");
  9. require("../data/dbcache/MemberLevel.php");
  10. include("../class/chtmlfun.php");
  11. $link=db_connect();
  12. $empire=new mysqlquery();
  13. //更新首页
  14. $indextemp=GetIndextemp();//取得模板
  15. NewsBq($classid,$indextemp,1,0);
  16. insert_dolog("");//操作日志
  17. //跟新自定义列表
  18. $b=0;
  19. $sql=$empire->query("select listid,pagetitle,filepath,filetype,totalsql,listsql,maxnum,lencord,listtempid,pagekeywords,pagedescription from {$dbtbpre}enewsuserlist where listid>0 order by listid limit ".$public_r['reuserlistnum']);
  20. while($r=$empire->fetch($sql))
  21. {
  22. $b=1;
  23. $newstart=$r[listid];
  24. ReUserlist($r,"");
  25. }
  26. echo '更新首页,自定义列表页成功';
  27. db_close();
 

直接在计划任务中添加定时访问URL,将该文件路径填进去,如:

http://域名/e/htmlindex/index_html.php

有问题可以加入网站技术QQ群一起交流学习

本站会员学习、解决问题QQ群(691961965)

客服微信号:lpf010888

pbootcms教程

织梦教程

站长学院

SEO

wordpress

竞价教程

信息流

Title