一朵物语

标题: 去掉帝国cms7.0导航返回index.html [打印本页]

作者: 丨一朵丶小扇    时间: 2015-2-17 20:32
标题: 去掉帝国cms7.0导航返回index.html
之前的帝国cms版本是没有出现这样的问题的,是新的帝国cms7.0版本才有,官方也给出了为什么导航会出现index.html的原因。

要去掉帝国cms7.0导航返回的index.html需要找到e/class/connect.php文件,然后找到代码:
  1. //返回首页地址
  2. function ReturnSiteIndexUrl(){
  3.     global $public_r;
  4.     if($public_r['indexpagedt'])
  5.     {
  6.         $public_r['indextype']='.php';
  7.     }
  8.     $file=$public_r['newsurl'].'index'.$public_r['indextype'];
  9.     return $file;
  10. }
复制代码
替换成:
  1. //返回首页地址
  2. function ReturnSiteIndexUrl(){
  3.         global $public_r;
  4.         if($public_r['indexpagedt'])
  5.         {
  6.                 $public_r['indextype']='.php';
  7.         }
  8.         $file=$public_r['newsurl'];
  9.         return $file;
  10. }
复制代码
修改的地方在$file=$public_r['newsurl'];   去掉了后面的后缀.这样就可以了。还有帝国cms导航标签[!----newsnav--]里面的“首页”改成自己想要的。






欢迎光临 一朵物语 (http://bbs.yiduo.org/) Powered by Discuz! X3.2