免费一级码无码婬片AA,多姿,国产成人精品日本亚洲18图 ,亚洲欧美视频一区,久久久久国产精品一区

做網站找實速,專業網站制作設計平臺
首頁 > 課堂 > 網站技術 > 詳情
網站標簽 / Tags

帝國CMS自動刷新首頁的方法

2020-02-16 15:40:50   來源:實速網絡|網站建設|網站設計|網站優化|網站仿制|網站SEO|網站推廣|空間域名|主機VPS|服務器|網站源碼|網站模版   瀏覽: 次
帝國CMS自動刷新首頁的方法 發布時間:2019-12-04 來源:未知 瀏覽: 關鍵詞:帝國CMS

帝國CMS自動刷新首頁的方法

發布時間:2019-12-04 來源:未知 瀏覽: 關鍵詞:帝國CMS 

帝國CMS自動刷新首頁的方法

本文實例講述了帝國CMS自動刷新首頁的方法。分享給大家供大家參考。具體實現方法如下:

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

代碼如下:

<script language="javascript" type="text/javascript" src="/e/htmlindex/index_html.php"></script>

在 /e/ 建立文件夾 htmlindex 并設置 777權限,將下面代碼保存在 /e/htmlindex/index_html.php,修改刷新時間,將文件中1200改為你想要的時間,單位為秒.

推薦學習《帝國cms教程

代碼如下:

<?phprequire("../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;/*函數解釋file_exists() 函數檢查文件或目錄是否存在。mkdir() 函數創建目錄。time() 函數返回當前時間的 Unix 時間戳。filemtime() 函數返回文件內容上次的修改時間。*/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;?>

希望本文所述對大家的帝國CMS建站有所幫助。

以上就是帝國CMS自動刷新首頁的方法的詳細內容,更多請關注魔酷閣其它相關文章!

責任編輯:實速科技