通过以下修改,让手机站首页是动态的,不生成index.html,PC端更新后,手机端首页自动更新,把\m\index.php里面的:
01 $row['showmod'] = isset($row['showmod'])? $row['showmod'] : 0; 02 if ($row['showmod'] == 1) 03 { 04 $pv->SaveToHtml(dirname(__FILE__).'/index.html'); 05 include(dirname(__FILE__).'/index.html'); 06 exit(); 07 } else { 08 $pv->Display(); 09 exit(); 10 } |
改成
1 $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']); 2 $pv->Display(); 3 exit(); |
这样就不会生成index.html ,手机网站就会自动更新了。