织梦DEDECMS实现自动更新主页功能建站问题
导读:建站问题建站问题?php require_once (dirname(__FILE__) . "/../include/common.inc.php"); $row = $ds建设网站网站seo优化培训。
?php require_once (dirname(__FILE__) . "/../include/common.inc.php"); $row = $dsql-GetOne("Select uptime From `cmsxx_arccache` where md5hash = 'autonew';"); if(!is_array($row)) exit(autonew(5)); $interval=60; //时间 秒 if(time() - $row['up […]
<?php require_once (dirname(__FILE__) . "/../include/common.inc.php"); $row = $dsql->GetOne("Select uptime From `cmsxx_arccache` where md5hash = 'autonew';"); if(!is_array($row)) exit(autonew(5)); $interval=60; //时间 秒 if(time() - $row['uptime'] < $interval ) exit(); autonew($no); function machom($no=''){ define('DEDEADMIN', ereg_replace("[/\\]{1,}",'/',dirname(__FILE__) ) ); require_once(dirname(__FILE__)."/../include/common.inc.php"); require_once(dirname(__FILE__)."/../include/arc.partview.class.php"); $dsql = new DedeSql(false); $row = $dsql->GetOne("Select * From cmsxx_homepageset"); $dsql->Close(); $templet=$row['templet']; $position=$row['position']; $homeFile = DEDEADMIN."/".$position; $homeFile = str_replace("\\","/",$homeFile); $homeFile = str_replace("//","/",$homeFile); $templet = str_replace("{style}",$cfg_df_style,$templet); $pv = new PartView(); $GLOBALS['_arclistEnv'] = 'index'; $pv->SetT网站建设公司emplet($cfg_basedir.$cfg_templets_dir."/".$templet); $pv->SaveToHtml($homeFile); } function autonew($no=''){ global $dsql; $sql = "SELECT id FROM `cmsxx_archives` where arcrank <>'0' limit $no ;"; $dsql->SetQuery($sql); $dsql->Execute(); while($row = $dsql->GetArray()){ $id = $row['id']; $time = time() - rand(0,$interval * 10); $dsql->ExecuteNoneQuery("Update `cmsxx_arctiny` set `arcrank`='0', `sortrank`='$time' where id = '$id';"); $dsql->ExecuteNoneQuery("Update `cmsxx_archives` set `arcrank`='0', `sortrank`='$time', `pubdate`='$time' where id = '$网站seo优化软件id';"); &nbs公司网站建设p; } machom($no); $dsql->ExecuteNoneQuery("Update `cmsxx_arccache` set `uptime`=".time()." where md5hash = 'autonew'"); } ?>
相关建设网站网站seo优化培训。声明: 本文由我的SEOUC技术文章主页发布于:2023-05-26 ,文章织梦DEDECMS实现自动更新主页功能建站问题主要讲述自动更新,标签,CMS网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_10102.html