QQ咨询不加好友发不了信息,咨询前先加好友! → QQ:820896380

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

在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

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

请我们喝杯咖啡,谢谢^_^

给TA打赏
共0人
如本文“对您有用”,欢迎随意打赏,金额不重要,认可最重要!
    豆包可以帮你高效完成AI问答、AI对话、提供软件相关教程以及解决生活中遇到的各种疑难杂症,还能帮助你进行AI写作、AI绘画等等,提高你的工作学习效率。
    !
    你也想出现在这里?立即 联系我们吧!
    信息
    个人中心
    购物车
    优惠劵
    今日签到
    搜索