在e/下面新建文件夹htmlindex(可自己命名),在htmlindex下创建index_html.php(可自行命名,文件以.php结尾)文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <?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,将该文件路径填进去,如:
/e/htmlindex/index_html.php
声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:312334557@qq.com 我们将配合处理!
原文地址:《帝国CMS自动更新刷新首页,自定义列表页》发布于2023-02-18 11:47:05