鉴于大家对 KingCMS PHP 企业版 只能安装在网站根目录而不能装在子目录下而深表遗憾,此次已将在该 BUG 纳入 SP1 的 BUG 修复列表中。但很多人已经等不及 SP1 的发布,所以这里我先把修改方法告诉大家,已解广大 KingCMS 用户的燃眉之急。

本次修改仅涉及一个文件:system/core.class.php。

1、打开 system/core.class.php;

2、找到 660 行:

if(substr($path_info,0,10)=='/index.php'){
  $path_info=substr($path_info,10);
}

将其替换为:
if(substr($path_info,0,9+strlen($this->config('inst')))==$this->config('inst').'index.php'){
  $path_info=substr($path_info,9+strlen($this->config('inst')));
}

3、找到 667 行:
'url'=>$_SERVER['SERVER_NAME'],

将其替换为:
'url'=>$_SERVER['SERVER_NAME'].$this->config('inst'),

这样就完成整个修改过程了。

 

如果不知道如何改,那么下载附件解压到 system/目录下即可。

点击打开链接