[提问]
godaddy的win主机安装discuz x2 域名显示子目录问题
|
|
安装dx2.0在godaddy的win主机下的子目录/zhufu/bbs,域名是:bbs.zhufu.info, 但是现在打开网页都是bbs.zhufu.info/zhufu/bbs
在网上搜下都是以前的资料,跟现在不一样了,哪位大牛帮看下
贴上class_core.php里面关于这个问题的代码:
$_G['PHP_SELF'] = htmlspecialchars($_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['PHP_SELF']);
$_G['basescript'] = CURSCRIPT;
$_G['basefilename'] = basename($_G['PHP_SELF']);
$sitepath = substr($_G['PHP_SELF'], 0, strrpos($_G['PHP_SELF'], '/'));
if(defined('IN_API')) {
$sitepath = preg_replace("/\/api\/?.*?$/i", '', $sitepath);
} elseif(defined('IN_ARCHIVER')) {
$sitepath = preg_replace("/\/archiver/i", '', $sitepath);
}
$_G['siteurl'] = htmlspecialchars('http://'.$_SERVER['HTTP_HOST'].$sitepath.'/');
$url = parse_url($_G['siteurl']);
$_G['siteroot'] = isset($url['path']) ? $url['path'] : '';
$_G['siteport'] = empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':'.$_SERVER['SERVER_PORT'];
if(defined('SUB_DIR')) {
$_G['siteurl'] = str_replace(SUB_DIR, '/', $_G['siteurl']);
$_G['siteroot'] = str_replace(SUB_DIR, '/', $_G['siteroot']);
}
$this->var = & $_G; |
|
|
|
|
|
|
|
|
|
|
mkey911
发表于 2011-5-16 19:12:51
|
显示全部楼层
没人知道吗? |
|
|
|
|
|
|
|
|
|
|
shurufa
发表于 2011-5-16 19:17:47
|
显示全部楼层
等高手吧。
估计屏蔽掉这行代码就可以
$_G['siteroot'] = str_replace(SUB_DIR, '/', $_G['siteroot']);
更有可能是你后台设置域名的问题。 |
|
|
|
|
|
|
|
|
|
|
lwbo1987
发表于 2011-5-17 10:39:00
|
显示全部楼层
|
|
|
|
|
|
|
|