用dedecms会手机站首页不更新的苦恼,每次PC更新,要去删除m目录下的index.html,手机站首页才会更新,这样很麻烦,通过以下修改,让手机站首页是动态的,不生成index.html,PC端更新后,手机端首页自动更新。
把\m\index.php里面的
|
1
2
3
4
5
6
7
8
9
10
|
$row['showmod'] = isset($row['showmod'])? $row['showmod'] : 0;if ($row['showmod'] == 1){ $pv->SaveToHtml(dirname(__FILE__).'/index.html'); include(dirname(__FILE__).'/index.html'); exit();} else { $pv->Display(); exit();} |
改成
|
1
2
3
|
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);$pv->Display();exit(); |