For PHP beginners like me, setting up the PHP runtime environment must be difficult. Then we use an integrated environment like appserv to help us quickly build the PHP runtime environment. Appser contains the Apache server, MySQL database, and phpMyAdmin.
First, go to the official website of appserv to download the version of the starter you need. The difference between the version is that the supported Apache server, MySQL database, and PHP version are different, the current version is 2.5.10. Start installation:
I used to install appserv in the root directory of the disk (for ease of use ):
Here let you select the components to install:
Apache Server Configuration:
MySQL database configuration (the root user password is required ):
After the installation is complete, start the Apache server and MySQL database:
Enter http: // localhost in the address bar of the browser. The following interface indicates that the Apache server is successfully started:
In this case, you can see the following directory structure in the installation directory of appserv:
The WWW folder is the storage path of the PHP file, in which we create the hello. php file. The file content is as follows:
<? PHP
Echo "test PHP! ";
?>
Enter http: // localhost/Hello. php In the browser and you can see the following content:
Now we have configured the PHP runtime environment.