PHP learning journey-building the PHP environment and building the php Environment
1.wampserver.exe Software Download
Http://www.wampsferver.com/ address: select the corresponding version to download.
The access to the above foreign websites may be slow. You can download it from my Baidu online storage:
Http://pan.baidu.com/s/1misVr0s
2. wampserver Service Control Panel
The main control is the configuration of the entire wampserver, mysql, php, apache, website root directory, and management of some configuration files.
It mainly involves service restart, exit, and set language.
3. How to check whether the package is installed
Open the browser and enter localhost and press Enter. If the following page appears, it indicates that the installation is successful.
If the input localhost does not respond, it may be because port 80 is occupied. By default, Apache enables port 80.
3.1 how to modify the default apache port in wampserver
After opening, you need to modify 2 places. crtl + f search for 80
Replace the above 80 with the unused port. Here I use 8082.
4. Customize the website root directory
To enable our php code to be separated from the service, we can put our php code in a separate directory. The default root directory of wampserver is the www directory under the installation directory.
To facilitate management, we can set the root directory of the website to the location we want to specify. Here I select the php folder in the d directory.
4.1 modify the httpd. cof File
Change the DocumentRoot directory to D:/PHP/
Modify Directory D:/PHP/
4.2 modify the wampmanager. ini file
Change the www directory to the PHP Directory.
Change the FIleName value to D:/PHP/
4.3 modify the wampmanager. tpl File
Change $ {w_wwwDirectory} to the PHP Directory
Change the FIleName value to D:/PHP/
5. hello world
Create a hello world. php file under the configured website root directory
<?php echo "hello world";?>
Write the preceding content and save
Http: // localhost: 8082/then input hello world. php In the browser to see the "hello world" text.