Home > Backend Development > PHP Tutorial > The first PHP program - Hello World

The first PHP program - Hello World

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:14:36
Original
1335 people have browsed it

(1) Follow my first two articlesblog"How to install XAMPP on Mac" and "Eclipse Configuring PHP Development Environment". Configure the PHP development environment and server.

(2) To switch the workspace, be sure to switch the workspace for developing PHP to the directory of the XAMPPserver. Otherwise, the PHP program cannot be run. As shown in the figure, the default path of XAMPP is generally as follows:

第一个PHP程序——Hello World

(3) Create a new PHP Project in Eclipse, and then create a new PHP File in the project. The implementation code is as follows:

<?php

echo &#39;Hello World!&#39;;
Copy after login

(4) Open XAMPP and open Apache Web Server inside. As shown in the picture:

第一个PHP程序——Hello World.

(4) Then right-click on the blank space of the current file-->Run As-->PHP Web Appliction. to run the program, the effect is as follows: Of course, you can also copy the link to the browser, and you can see the same The effect.

第一个PHP程序——Hello World

The above has introduced the first PHP program-Hello World, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template