Environment construction
Software:
XAMPP Download Address: https://www.apachefriends.org/zh_cn/index.html (recommended to use Thunderbolt download, or speed may be unbearable)
1. Installation
Open after installation to see the following:
2. Open the Service
Start Apache MySQL Service
3. Access Address
To browser input: http://127.0.0.1/xampp/splash.php
See the following interface: Description of the PHP environment has been built
Write HelloWorld:
To your installation path: (I install under D disk)
Open Folder See
The PHP language is placed by default in the Htdocs directory:
Create a new file under the Htdocs folder helloworld.php
Open the helloworld.php file and enter the following code:
Copy Code code as follows:
<?php
echo "HelloWorld,"; Output string HelloWorld
echo "This is my firstphp script."; Ditto
Echo Phpinfo (); Phpinfo () Output PHP environment information for system functions
?>
Open Address bar input: 127.0.0.1/helloworld.php
See the following screen:
This is your first HelloWorld.