[提问]
Discuz! X1.5 的杯具 怎么就会出现子目录呢
|
|
在论坛上查看了资料, 发现有人解决了这个问题..
http://bbs.idcspy.com/viewthread.php?tid=158180&pid=756387&page=1&extra=#pid756387
可是我也按照这个方法弄.却没有成功..怎么回事呢.请版主大人搭救一下...
这是我修改的代码- $_G['basefilename'] = basename($_G['PHP_SELF']);
- $_G['siteurl'] = str_replace("/7zoujie.com/","",htmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api)?\/*$/i", '', substr($_G['PHP_SELF'], 0, strrpos($_G['PHP_SELF'], '/'))).'/'));
- $_G['siteroot'] = str_replace("/7zoujie.com/","",substr($_G['PHP_SELF'], 0, -strlen($_G['basefilename'])));
复制代码 |
|
|
|
|
|
|
|
|
|
|
onway
发表于 2011-1-17 10:42:37
|
显示全部楼层
$_G['basefilename'] = basename($_G['PHP_SELF']);
$_G['siteurl'] = str_replace("/7zoujie.com/","",htmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api)?\/*$/i", '', substr($_G['PHP_SELF'], 0, strrpos($_G['PHP_SELF'], '/'))).'/'));
$_G['siteroot'] = str_replace("/7zoujie.com/","",substr($_G['PHP_SELF'], 0, -strlen($_G['basefilename']))); |
|
|
|
|
|
|
|
|
|
|
onway
发表于 2011-1-17 10:45:57
|
显示全部楼层
这个是我的主机
Hosting - Grid - Deluxe - Windows - 1 year (recurring) |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2011-1-17 10:53:31
|
显示全部楼层
把xiangyang.us替换为域名所在目录
$_G['siteurl'] = str_replace("/xiangyang.us","",htmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api)?\/*$/i", '', substr($_G['PHP_SELF'], 0, strrpos($_G['PHP_SELF'], '/'))).'/'));
$_G['siteroot'] = str_replace("/xiangyang.us","",substr($_G['PHP_SELF'], 0, -strlen($_G['basefilename']))); |
|
|
|
|
|
|
|
|
|
|
cnya
发表于 2011-4-1 12:48:23
|
显示全部楼层
|
这个方法对Discuz! X1.5的版本无效,寻求解决办法啊。。。。。 |
|
|
|
|
|
|
|
|
|
|
lwbo1987
发表于 2011-4-1 13:05:08
|
显示全部楼层
|
|
|
|
|
|
|
|