Long time no update blog park, come back to irrigation.
"Hey, can you get PHP?" Would you? "I know, but it won't."
Just on business trip, a little spare time, ready to learn about PHP. Learning a new thing, setting up the environment is the first priority, the official to build the environment is more complex, the need to install Apach server, MySQL, PHP, here is recommended to install PHP integrated development environment Wampserver.
The installation steps are simple, always next, just remember your installation directory. After the installation is complete, the computer status bar will appear a small green icon, on behalf of the service started successfully, red on behalf of the service stopped, Orange on behalf of the service failed to start.
You can modify the language of Wamp, here I switch the Chinese, right click. Green icon (Start success)
I first build the time has been the orange icon, checked, found that my native IIS port is 80, occupy the Apach server 80 port, causing the failure to start, I recommend that you replace the port of the local IIS.
If you have MySQL installed on this machine, the 3306 port will also conflict, orange most of the reasons are port occupancy issues.
The left mouse click icon will appear in the menu, including Apach server, PHP, Mysql.
Wamp directories such as:
Let's write a originator code:
New helloworld.php file on the desktop, open with the editor, personal preferred sublimetext, style bang Bang ~
<?php
echo "Hello world!";
?>
Then copy it to the Wamp installation under the WWW folder:
Open Wamp's localhost
Open Web page
Enter your PHP name in the address bar, where we enter http://localhost/helloworld.php
Run successfully
Today is mainly to introduce the construction of PHP development environment and the first HelloWorld program, I also in the study, we fighting~
Later will not regularly update about PHP things, thank you for your attention ~
PHP Environment Setup and helloworld.php