Home  >  Article  >  Backend Development  >  How to modify the root directory in php

How to modify the root directory in php

coldplay.xixi
coldplay.xixiOriginal
2020-08-03 14:15:495448browse

How to modify the root directory of php: First click the wamp icon, select the file [Apache→httpd-vhosts.conf] in order; then search for [Menu.Left] to modify the root directory in the Wamp menu; finally browse Just access the file in the server to test.

How to modify the root directory in php

How to modify the root directory of php:

1. Click the wamp icon and select Apache→ httpd.conf

As shown in the figure below, modify the content in the circle to a new folder

How to modify the root directory in php

2. Click wamp icon, select the Apache→httpd-vhosts.conf file

As shown below, the same as the previous step

How to modify the root directory in php

##3. Modify the root directory in the Wamp menu

When we make the above modifications, we will find that the www directory in the Wamp menu will still point to the original directory, so we have to continue to modify it

Find two files in the root directory of Wamp: wampmanager.tpl and wampmanager.ini

3.1 Modify wampmanager.ini

Open the file in text mode, Ctrl F to find

Menu. Left

As shown in the figure below, modify the corresponding content. The former is the name required by the user, and the latter is the specified path

How to modify the root directory in php

3.2 Modification wampmanager.tpl

Same as the previous step

How to modify the root directory in php

TIP: Please restart Wamp after completing the above operations

4. Test

Create a new text file in the set location and write the PHP code. After saving, change the suffix to php.

How to modify the root directory in php

Create and write

How to modify the root directory in php

Modify

How to modify the root directory in php

Then access the file in the browser


Related learning recommendations:

php graphic tutorial

The above is the detailed content of How to modify the root directory in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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