織夢(mèng)cms如何每分鐘審核一篇文章并且生成首頁(yè),織
導(dǎo)讀:織夢(mèng)文章織夢(mèng)文章dede 每分鐘審核一篇文章并且生成首頁(yè): 直接進(jìn)入正題: plus下新建文件 makeid.php 內(nèi)容如下: ?php$lasttime=filemtimedede模板下載織夢(mèng)cms模板。
dede 每分鐘審核一篇文章并且生成首頁(yè):直接進(jìn)入正題:plus下新建文件 makeid.php 內(nèi)容如下:
<?php $lasttime=filemtime($_SERVER['DOCUMENT_ROOT']."/index.html"); $interval=180; //更新時(shí)間秒為單位180秒=3分鐘 3分鐘審核一篇 if((time()-$lasttime)>$interval) { require_once(dirname(__FILE__)."/../include/模板織夢(mèng)common.inc.php"); $row = $dsql->GetOne("select id from`dede_archives` where arcrank = -1"); // 找到未審核的文章排序根據(jù)你的要求修改下 $aid= $row['id']; if($aid!=''){ //審核文章 $upquery = "Update `dede_archives` set arcrank =0 where id='$aid';"; $upquery1 = "Update `dede_arctiny` set arcrank =0 where id='$aid';"; $rs = $dsql->ExecuteNoneQuery($upquery); $rs1 = $dsql->ExecuteNoneQuery($upquery1); $isremote = (empty($isremote)? 0dede模板堂 : $isremote); function MakeArt($aid, $mkindex=FALSE, $ismakesign=FALSE, $isremote=0) { global $envs, $typeid; require_once(DEDEINC.'/arc.archives.class.php'); if($ismakesign) $envs['makesign'] = 'yes'; $arc = new Archives($aid); $reurl = $arc->MakeHtml($isremote); return $reurl; } $arcID=$aid; $artUrl = MakeArt($aid,true,true,$isremote); require_once(DEDEINC.'/arc.partview.class.php'); $envs = $_sys_globals = array(); $envs['aid'] = 0; $pv = new PartView(); $row = $pv->dsql->GetOne('SELECT * FROM `cn_homepageset`'); $templet = str_replace("{style}", $cfg_df_style, $row['templet']); $homeFile = dirname(__FILE__).'/'.$row['position']; $homeFile = str_replace("http://", "/",dede后臺(tái)模板 str_replace("\\", "/", $homeFile)); $fp = fopen($homeFile, 'w') or die("無法更新網(wǎng)站主頁(yè)到:$homeFile 位置"); fclose($fp); $tpl = $cfg_basedir.$cfg_templets_dir.'/'.$templet; if(!file_exists($tpl)) { $tpl = $cfg_basedir.$cfg_templets_dir.'/default/index.htm'; if(!file_exists($tpl)) exit("無法找到主頁(yè)模板:$tpl "); } $GLOBALS['_arclistEnv'] = 'index'; $pv->SetTemplet($tpl); $pv->SaveToHtml($homeFile); $pv->Close(); exit(); }else exit(); } ?>然后在首頁(yè)模板里面最后面加入 <script src="/plus/mkaid.php" language="javascript"></script> 就ok了
相關(guān)dede模板下載織夢(mèng)cms模板。聲明: 本文由我的SEOUC技術(shù)文章主頁(yè)發(fā)布于:2023-07-21 ,文章織夢(mèng)cms如何每分鐘審核一篇文章并且生成首頁(yè),織主要講述首頁(yè),每分鐘,織夢(mèng)網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請(qǐng)保留鏈接: http://www.bifwcx.com/article/web_32960.html
為你推薦與織夢(mèng)cms如何每分鐘審核一篇文章并且生成首頁(yè),織相關(guān)的文章
-
dedecms首頁(yè)中文章列表無刷新頂、踩的實(shí)現(xiàn)
(120)人喜歡 2023-07-21 -
織夢(mèng)網(wǎng)站地圖Sitemap+百度Ping推送功能實(shí)現(xiàn)
(160)人喜歡 2023-07-21 -
DeDecms后臺(tái)設(shè)置及網(wǎng)站地圖seo優(yōu)化,織夢(mèng)技
(50)人喜歡 2023-07-21 -
DedeCMS模板制作自定義表單時(shí)添加驗(yàn)證碼的
(166)人喜歡 2023-07-21 -
織夢(mèng)標(biāo)簽:sonchannel 子欄目調(diào)用,織夢(mèng)教程
(103)人喜歡 2023-07-21 -
在織夢(mèng)cms中使用繁體轉(zhuǎn)簡(jiǎn)體的函數(shù)BIG5To
(186)人喜歡 2023-07-21