最新公告
  • 欢迎您光临 我爱模板网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境! 立即加入钻石VIP
  • 帝国CMS自动更新刷新首页,自定义列表页教程

    正文概述 管理员   2025-09-04   6

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

    <?php
    
    require("../class/connect.php");
    include("../class/db_sql.php");
    include("../class/config.php");
    include("../class/functions.php");
    include("../class/t_functions.php");
    require LoadLang("pub/fun.php");
    require("../data/dbcache/class.php");
    require("../data/dbcache/MemberLevel.php");
    include("../class/chtmlfun.php");
    $link=db_connect();
    $empire=new mysqlquery();
    //更新首页
    $indextemp=GetIndextemp();//取得模板
    NewsBq($classid,$indextemp,1,0);
    insert_dolog("");//操作日志
    //跟新自定义列表
    $b=0;
    $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']);
    while($r=$empire->fetch($sql))
    {
    	$b=1;
    	$newstart=$r[listid];
    	ReUserlist($r,"");
    }
    echo '更新首页,自定义列表页成功';
    db_close();
    

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

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


    我爱模板网 » 帝国CMS自动更新刷新首页,自定义列表页教程

    发表评论

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者
    script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?587cc1e5c052b5b0ce99533beff13c96"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();

    请选择支付方式

    ×
    支付宝支付
    余额支付
    ×
    微信扫码支付 0 元