It has been almost a year since I came into contact with PHP, and I have been learning intermittently. Recently, the company needs web-related development, but the team currently does not have relevant personnel. I had no choice but to put it on the shelf, and there happened to be an opportunity to further learn PHP. At the same time, I also came up with the idea of writing a PHP tutorial to improve myself and help others at the same time. Of course, this is just entry-level, so please ignore it.
Let’s get to the point, which is the first step in any development, environment setup. Since we are beginners, let’s use the simplest and foolproof way. .
#1. Download WampServer.
W means Windows platform, a means Apache, m means the famous database mysql, and p means PHP. Of course, the corresponding one is LampServer, which is the integrated development environment under the Linux platform.
Just download the corresponding version according to the operating system.
2. Installation
Run the installation package and go to the next step.
3. Check whether the installation is successful
After the installation is complete, there will be a Wamp icon in the lower right corner of the desktop. A menu pops up after clicking:
##Click Localhost to open the following page
##like If the above page is opened successfully, the PHP environment is installed successfully.
If the above page cannot be opened, it is usually because Apache’s default http port 80 is occupied. At this time, we can close other applications occupying port 80 or modify the port number of apache. Then restart apache.
4. The first php program
#Click www directory in the menu of step 3 to enter the web project deployment directory.
Create a new text document in this directory and change the file name to hellophp.php
##The following is the world-famous piece of code:
##<?php
echo "Hello PHP!";
?>
Okay, I believe you must see the result. Start your PHP journey from now on!
The above is the detailed content of Introduction to PHP development-environment setup diagram. For more information, please follow other related articles on the PHP Chinese website!