A-A+

KingCMS企业版(PHP)如何支持非根目录安装

2013年10月22日 Kingcms 暂无评论 阅读 242 次浏览 次

鉴于大家对 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'),



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

 

 

标签:

评论已关闭!

Copyright © 香港虚拟主机_美国虚拟主机_香港服务器_美国服务器租用托管 保留所有权利.   Theme  Ality 蜀ICP备14006632号-1

用户登录