找到文件:
\phpcms\modules\special\functions\global.func.php
function content_url 此函数,大概位置23行---56行,找到如下代码:/*** 内容页url* @param $contentid 文章ID* @param $page 当前页* @param $addtime 文章发布时间* @param $type 返回路径的格式(.html|.php)* @param $site_info 站点信息* @param $type 类型 静态地址 $type = 'html', 动态地址 $type='php'*/function content_url($contentid = 0, $page = 1, $addtime, $type = 'html', $site_info = '') {if (!$contentid) return '';$url = array();$page = max(intval($page), 1);$app_path = substr(APP_PATH, 0, -1);switch ($type) {case 'html':if ($site_info['dirname']) {if ($page==1) {$url[0] = $site_info['domain'].'.$contentid.'.html';$url[1] = pc_base::load_config('system', 'html_root').'/'.$site_info['dirname'].'/'.$contentid.'.html';} else {$url[0] = $site_info['domain'].'.$contentid.'-'.$page.'.html';$url[1] = pc_base::load_config('system', 'html_root').'/'.$site_info['dirname'].'/'.$contentid.'-'.$page.'.html';}} else {if ($page==1) {$url[0] = $url[1] = pc_base::load_config('system', 'html_root').'/'.$contentid.'.html';$url[0] = $app_path.$url[0];} else {$url[0] = $url[1] = pc_base::load_config('system', 'html_root').'/'.$contentid.'-'.$page.'.html';$url[0] = $app_path.$url[0];}}break;
按照你的信用修改上面带有颜色部分的代码!红色部分的代码请修改为一致的。不然会出现未知的问题!














发表评论