Web Design
Mobile Internet
Brand Design
Innovative
News
Encyclopedias

How to Run the First Program of PHP

Date:2016-12-16 Source: Shangpin China Type: website encyclopedia
Word Size: small   medium   big

After continuous installation and setting, someone must ask, "Can PHP run this way?" Now let's run the first one Website production PHP program.

(1) Start Zend Studio, as shown in Figure 2.19.
 Start Zend Studio

(2) When Zend Studio is started for the first time, a window for setting the workspace as shown in Figure 2.20 will pop up.
 Set up a workspace

(3) Choose File | New | Local PHP Project, as shown in Figure 2.21.
 Select Menu

(4) Enter "HelloWorid" in the "Project Name" text box in the pop-up dialog box, and enter the root directory set in Apache on the right side of "Location", as shown in Figure 2.22.
 Create a new project


(5) Click Finish to create a new project, as shown in Figure 2.23. The files in the project are listed in the PHP Explorer on the left.
 New project

(6) A file named "index. php" is automatically added to the new item date. Double click the file to open it, and enter the following code in the file.

 Hello World

(7) Press the shortcut key "Ctrl+S" or select the command "File" | "Save" to save. Then press "Ctrl+F11" to run the code, and a dialog box as shown in Figure 2.24 will be displayed to select the method to run the code.
 Select how to run code

(8) Select "PHP Web Application" to run the PHP code as a web page, and click "OK" to see the running results as shown in Figure 2.25. This is to display the running results of the code as a built-in browser.
 Operation results
The exciting moment is always so short that it is only a small step for PHP to say "Hello World", and also a big step for those who have not yet touched PHP!


Please contact our consultant

+86 10-60259772

Please provide your contact number. The project manager of shangpin China will contact you as soon as possible.