宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

dede如何更新首页栏目(dedecms下拉刷新)-冯金伟博客园

如何让dedecms Dreamweaver网站首页自动更新?

js和php用于自动主页更新:

在/plus目录下创建一个新的autoupdate.php文件。

<?

$ updatetime = 1800//自动更新时间,单位是秒,这里我设置为一小时,你可以自己更改。

$ fpath = & quot../data/update _ time . Inc & quot;;//记录更新时间文件。如果无法实现目标,请检查您是否有读取权限。

包含($ fpath);

if(empty($last_time)){

$ last _ time = 0;

}

if((time()-$ last _ time)& gt;=$updatetime)

{

定义(& # 39;DEDEADMIN & # 39,ereg _ replace(& quot;[/]{1,} & quot,'/',dirname(_ _ FILE _ _));

require_once(DEDEADMIN。& quot/../include/common . Inc . PHP & quot;);

require_once(DEDEINC .& quot/arc . part view . class . PHP & quot;);

$ templet = & quotdefault/index.htm"//这里是首页模板位置,目前是dede默认的首页位置。

$ position = & quot../index . html & quot;;

$homeFile = dirname(__FILE__)。& quot/& quot;.$位置;

$ homeFile = str _ replace(& quot; & quot,& quot/& quot;,$ home file);

$ homeFile = str _ replace(& quot;//& quot;,& quot/& quot;,$ home file);

$ PV = new part view();

$ PV-& gt;SetTemplet( $cfg_basedir。$cfg_templets_dir。& quot/& quot;.$ templet);

$ PV-& gt;SaveToHtml($ home file);

$ PV-& gt;close();

$file = fopen( $fpath,& quotw & quot);

fwrite($file,& quot& lt马鞭php n & quot);

fwrite($file,& quot $ last _ time = & quot.时间()。& quot; n & quot);

fwrite($file,& # 39;马鞭& gt');

fclose($ file);

}

马鞭& gt首页介绍以下js:

<script src="/plus/autoupdate.php" type="text/javascript"></script>

以上可以刷新首页。

织梦系统更新主页HTML,无法生成,然后用一键更新网站。可以更新,谁知,俩三个小时后,也不行了?

你好,清理下dede的缓存 试试, 不是浏览器的缓存 是dede的系统缓存哦, 在一键更新下面的栏目

Dedecms怎么重新安装?(在删除了已安装文件及创建的数据库情况下)?

dedecms重新安装的方法:

1、进入网站ftp找到安装目录installindex.php.bak文件,改名为index.php;

2、将安装目录下installinstall_lock文件删除去;

3、运行http://地址安装目录/install/index.php进入安装即可