您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息

WampServe修改默认网站目录的方法

2024/4/19 17:52:45发布6次查看
1wamp简介
wampserve集成了apache、mysql、php、phpmyadmin,支持apache的mod_rewrite,php扩展、apache模块只需要在菜单“开启/关闭”上点点就搞定,省去了修改配置文件的麻烦,这里就简写成wamp
假设如下:
wamp版本:2.1
wamp2.0安装目录:c:/
www目录:c:/wamp/www/
变更目录:e:/phproot/
一 主要过程:
(1)修改 c:\wamp\bin\apache\apache2.2.17\conf \httpd.conf(实现更改默认网站路径,即将http://localhost定向到自己的默认目录:e:/phproot/)
(2)拷贝并修改index.php(使新默认网站路径中的index.php可以正常显示,如果不需要index.php可以略过此步)
(3)修改c:\wamp\wampmanager.ini和c:\wamp\wampmanager.tpl(改菜单中的“www 目录”指向)
二 具体修改方法全过程:
 第一步:修改c:\wamp\bin\apache\apache2.2.17\conf \httpd.conf
查找: documentroot c:/wamp/www/
修改: documentroot e:/phproot/
查找: 
修改: 
 第二步:拷贝并修改index.php
(1)拷贝:
将c:/wamp/www/拷贝至e:/phproot
(2)查找:
//chemin jusqu'au fichier de conf de wampserver
$wampconffile = '../wampmanager.conf';
//chemin jusqu'aux fichiers alias
$aliasdir = '../alias/';
(3)修改:
//chemin jusqu'au fichier de conf de wampserver
$wampconffile = 'c:/wamp/wampmanager.conf';
        //chemin jusqu'aux fichiers alias
$aliasdir = 'c:/wamp/alias/';
 第三步:修改wampmanager.ini和wampmanager.tpl
1 修改c:\wamp\wampmanager.ini:
(1)打开:c:\wamp\wampmanager.ini
(2)查找:type: item; caption: www 目录; action: shellexecute; filename: c:/wamp/www/; glyph: 2
(3)修改:type: item; caption: www 目录; action: shellexecute; filename: e:/phproot/; glyph: 2
2 修改c:\wamp\wampmanager.tpl:
(1)打开:c:\wamp\wampmanager.tpl
(2)查找:type: item; caption: ${w_wwwdirectory}; action: shellexecute; filename: ${wwwdir}; glyph: 2
(3)修改:type: item; caption: ${w_wwwdirectory}; action: shellexecute; filename: e:/phproot; glyph: 2
完成所有步骤,保存文件,至此修改成功。
以上就介绍了wampserve修改默认网站目录的方法,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录