本文实例报告了帝国CMS自动革新首页的要领。分享给人人供人人参考。细致完成要领以下:
在首页模板中到场下面代码,只管放在底部.
代码以下:
<script language="javascript" type="text/javascript" src="/e/htmlindex/index_html.php"></script>
在 /e/ 竖立文件夹 htmlindex 并设置 777权限,将下面代码保存在 /e/htmlindex/index_html.php,修正革新时候,将文件中1200改成你想要的时候,单元为秒.
引荐进修《帝国cms教程》
代码以下:
<?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; /* 函数诠释 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自动革新首页的要领的细致内容,更多请关注ki4网别的相干文章!