After wampserver is installed, the default "WWW directory" is X:/Wamp/WWW (here, X is the drive letter), that is, the WWW folder under the wampserver installation directory. In actual use, the default settings are often not what we want, and it may be better for us to change to other folders.
E:/XX or D:/PHP.
The following example shows how to change the original default directory D:/Wamp/WWW to E:/xx.
1,
Open Wamp/scripts/config. Inc. php
Row 3, $ wwwdir = $ c_installdir. '/WWW ';
Change to $ wwwdir = 'e:/xx.
But this is a new problem. The default Apache root directory has not been changed yet! Continue to Step 1!
2,
Modify the default Apache root directory
Open Wamp/bin/Apache/apache2.2.11/CONF/httpd. conf and modify the values in the double quotation marks following DocumentRoot for what you want.
For example, set DocumentRoot "D:/Wamp/www /"
Change to DocumentRoot "E:/XX /"
At the same time, the <directory "D:/Wamp/www/">
Change to <directory "E:/XX/">
Restart wampserver to take effect.
This article references http://www.geini.com/blog? P = 49
$ C_installdir is a variable that indicates the root directory of wampserver installation.
After wampserver is installed, How can I change the default root directory WWW?