1.把shop目录下文件复制到网站根目录
2.修改config.ini.php里的shop绑定域名,删除shop目录
3.将原始根目录的index.php更名为default.php,修改index.php文件:
- $site_url = strtolower('http://'.$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/index.php')).'/shop/index.php');
- @header('Location: '.$site_url);
复制代码 改成:
- $site_url = strtolower('http://'.$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/default.php')).'/index.php');
- @header('Location: '.$site_url);
复制代码
4.打开根目录下的index.php
- if (!@include(dirname(dirname(__FILE__)).'/global.php')) exit('global.php isn\'t exists!');
复制代码 改成:
- if (!@include(dirname(__FILE__)).'/global.php') exit('global.php isn\'t exists!');
复制代码
5.后台更新缓存,确认网站无误后删除根目录下 shop文件夹。
|