(1) According to my top two blog "How Mac Installs Xampp", "Eclipse Configures the PHP development environment". Configure the PHP development environment and server.
(2) Switch workspace, must be the development of PHP workspace switch to the XAMPP server directory. Otherwise, you cannot run the PHP program. As shown in the figure, the default path for general Xampp is as follows:
(3) Create a new PHP project in Eclipse and create a new PHP File in the project. The implementation code is as follows:
<?php
Echo ' Hello world! ';
(4) Open the XAMPP and open the Apache Web Server inside. As shown in figure:
。
(4) Then right--->run the as-->php Web appliction in the current file space. Run the program, the effect is as follows: Of course, you can also copy the link to the browser, you can see the same effect.
。
GitHub home: https://github.com/chenyufeng1991. You are welcome to visit.