WampServe修改默认网站目录的方法,wampserve目录_PHP教程

WBOY
Release: 2016-07-13 09:45:10
Original
1043 people have browsed it

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

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

 

完成所有步骤,保存文件,至此修改成功。

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1043034.htmlTechArticleWampServe修改默认网站目录的方法,wampserve目录 1wamp简介 WampServe集成了Apache、MySQL、PHP、phpmyadmin,支持Apache的mod_rewrite,PHP扩展、Apache模块只...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!