destoon采集论坛

 找回密码
 立即注册
查看: 89|回复: 2

网站首页生成html 和 城市分站 的临时解决办法

[复制链接]

8

主题

65

回帖

172

积分

注册会员

Rank: 2

积分
172
发表于 2012-8-3 08:36:52 | 显示全部楼层 |阅读模式
主要改两个文件,路径为网站根目录: index.php , include\index.htm.php


1: 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);
回复

使用道具 举报

8

主题

65

回帖

172

积分

注册会员

Rank: 2

积分
172
 楼主| 发表于 2012-8-3 08:56:53 | 显示全部楼层

刚刚少考虑了 生成首页 操作.
想想 改了一下:

要操作的文件 有三个:

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');
回复 支持 反对

使用道具 举报

0

主题

11

回帖

30

积分

新手上路

Rank: 1

积分
30
发表于 2012-8-3 09:59:33 | 显示全部楼层

学习了               .
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|destoon采集论坛

GMT+8, 2025-11-26 11:11 , Processed in 0.018383 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表