How to modify the root directory in php

coldplay.xixi
Release: 2023-03-03 18:24:01
Original
5345 people have browsed it

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!

Related labels:
php
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
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!