在首頁模板中加入下面代碼,盡量放在底部。

創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于成都網(wǎng)站制作、成都做網(wǎng)站、臨滄網(wǎng)絡(luò)推廣、微信小程序開發(fā)、臨滄網(wǎng)絡(luò)營銷、臨滄企業(yè)策劃、臨滄品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎;創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供臨滄建站搭建服務(wù),24小時服務(wù)熱線:028-86922220,官方網(wǎng)址:www.chinadenli.net
script language="javascript" type="text/javascript" src="/e/htmlindex/index_html.php"/script
在 /e/ 建立文件夾 htmlindex 并設(shè)置 777權(quán)限
將下面代碼保存在 /e/htmlindex/index_html.php
修改刷新時間,將文件中1200改為你想要的時間,單位為秒。
?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();
$filepath_s="indexhtmlhc.txt";
$time=time();
@$filemtime=(int)filemtime($filepath_s)+1200;
/*
函數(shù)解釋
file_exists()?函數(shù)檢查文件或目錄是否存在。
mkdir()?函數(shù)創(chuàng)建目錄。
time()?函數(shù)返回當(dāng)前時間的?Unix?時間戳。
filemtime()?函數(shù)返回文件內(nèi)容上次的修改時間。
*/
if?(!file_exists($filepath_s)){
fopen($filepath_s,?'w');
@chmod($filepath_s,?0777);
ReIndex();
}elseif(!file_exists($filepath_s)?||?(filemtime($filepath_s)+1200)time()){
fopen($filepath_s,?'w');
@chmod($filepath_s,?0777);
ReIndex();
}else{
//?do?nothing
}
db_close();
$empire=null;
?
如果前臺文件采用靜態(tài)模式,那么后臺修改后,需要重新生成html文件,更新一下緩存即可。 具體方法是: 后臺 — 數(shù)據(jù)更新— 更新數(shù)據(jù)庫存緩 — 刪除欄目存緩文件 — 清除臨時文件和數(shù)據(jù),刷新所有欄目信息頁,刷新所有信息內(nèi)容頁(打上勾)
1.把廣告JS插入到首頁、欄目頁、內(nèi)容頁
2.刷新---》重新生成
3.OK
網(wǎng)站題目:帝國cms首頁定時更新 帝國cms80
URL網(wǎng)址:http://www.chinadenli.net/article20/dddpsco.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)建站、網(wǎng)站建設(shè)、服務(wù)器托管、ChatGPT、App設(shè)計、響應(yīng)式網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)