网站首页生成html 和 城市分站 的临时解决办法
主要改两个文件,路径为网站根目录: index.php , include\index.htm.php1: index.php 55行下
$html_file = $CFG['com_dir'] ? DT_ROOT.'/'.$DT['index'].'.'.$DT['file_ext'] : DT_CACHE.'/index.inc.html';
改为:
$html_file = $CFG['com_dir'] ? DT_ROOT.'/'.$DT['index'].'.'.$DT['file_ext'] : DT_CACHE.'/index.inc.html';
if($cityid) $html_file=str_replace('/index','/index_'.$cityid,$html_file);
2. include\index.htm.php 15行下
$filename = $CFG['com_dir'] ? DT_ROOT.'/'.$DT['index'].'.'.$DT['file_ext'] : DT_CACHE.'/index.inc.html';
改为:
$filename = $CFG['com_dir'] ? DT_ROOT.'/'.$DT['index'].'.'.$DT['file_ext'] : DT_CACHE.'/index.inc.html';
if($cityid) $filename=str_replace('/index','/index_'.$cityid,$filename);
刚刚少考虑了 生成首页 操作.
想想 改了一下:
要操作的文件 有三个:
index.php 55行下添加:
if($cityid) $html_file=str_replace('/index','/_city/index_'.$cityid,$html_file);
\include\index.htm.php 15行下添加:
if($cityid) $filename=str_replace('/index','/_city/index_'.$cityid,$filename);
\admin\index.inc.php 118行下添加:
dir_delete(DT_ROOT.'/_city');
学习了 .
页:
[1]