PHP with Environment change Wamp www directory

Source: Internet
Author: User
PHP config environment change Wamp www directory

?

Main process:
(1) Modify the httpd.conf file
(2) Modify the index.php file under the new WWW directory
(3) Modify Manage.ini 278 rows and 125 lines of MANAGE.TPL

My WAMP2.0 is installed on the E drive, so my www directory is e:/wamp/www/and I want to change it to g:/www/


The first step: according to what others say, modify the httpd.conf file
DocumentRoot "e:/wamp/www/"? This line is changed to DocumentRoot "g:/www/"
? This line should read
Save, restart Wamp, but did not achieve the results we want, http://localhost/is changed, but I want the normal installation of the home page is to display version information, then the original e:/wamp/www/in the index.php file copied to g:/www/, The error is displayed.


Second step: Open g:/www/under the index.php file, see line 11th to 15th:
Chemin jusqu ' au fichier de conf de wampserver
$wampConfFile = '. /wampmanager.conf ';
Chemin jusqu ' aux fichiers alias
$aliasDir = '. /alias/';
Correct the path to the configuration file and the virtual directory by changing the original relative path to an absolute path:
Chemin jusqu ' au fichier de conf de wampserver
$wampConfFile = ' e:/wamp/wampmanager.conf ';
Chemin jusqu ' aux fichiers alias
$aliasDir = ' e:/wamp/alias/';
This will be normal, restart Wamp open http://localhost/see the same as you normally see. If you do not need this homepage, want to make a home page, or just put a website to play, this step can not.
But the effect is still not perfect, http://localhost/problem is solved, but point to the bottom right corner of the icon, the menu has a "www directory", point after the open is still e:/wamp/www/, want to change into g:/www down to see


Step Three: Change the menu to "www directory" to point to
Open the installation directory e:/wamp/, I think Wamp is a software after all, the path to the menu can be set at the time of installation, so you have to change the configuration of the software, in the e:/wamp/I found four manage files, there is an EXE, I will not get, Open manage.conf, did not find anything to change, and open Manage.ini, found, in 278 lines.

Type:item; Caption: "www directory"; Action:shellexecute; FileName: "e:/wamp/www/"; Glyph:2

?

Change the e:/wamp/www/to g:/www/, so it should be, save, restart Wamp, point, menu, or point to the original directory, Again look at the Manage.ini file EditPlus, incredibly hint I file was accidentally modified, or to reload, then point is it, a look, 278 lines of the path was changed back to the e:/wamp/www/, and retry several times are not. It seems that there are other problems, not the last file, MANAGE.TPL, what should be a template file, open it, as expected, is 119 lines is [Menu.left], and then look down, 125 lines is this:
Type:item; Caption: "${w_wwwdirectory}"; Action:shellexecute; FileName: "${wwwdir}"; Glyph:2

?

${w_wwwdirectory} This is the WWW directory, then FileName after the variable should be a pointer to the directory, changed to say, FileName: After the quotation mark content to g:/www/, the final result is:
Type:item; Caption: "${w_wwwdirectory}"; Action:shellexecute; FileName: "g:/www/"; Glyph:2

?

Save the file, and then change the Manage.ini in 278 lines, also save, restart Wamp, try again, a little menu "www directory", opened the g:/www/, finally succeeded!!!!
Description: Wamp reboot sometimes may be invalid, I have encountered this situation, do not know how, in this case can first put Wamp full exit, and then start on it.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.