Home >Backend Development >PHP Tutorial >Learn PHP step by step (1) PHP development environment configuration_PHP tutorial

Learn PHP step by step (1) PHP development environment configuration_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:40:42959browse

1. AppServnetwork

First, let’s download some PHP related things.

First, let’s download a complete set of PHP-related tools-AppServnetwork.

AppServ 2.5.10 php operating environment

appserv 2.6.0 php operating environment

After the installation is complete, the following will appear in the start menu:

image

Let’s start Apache first. (Control Server by Service –>Apache Start). Among them, Apache and MySQL have been installed as Window services.

When the startup is successful. Let's open the installation directory:

On my local machine it is: D:AppServwww. We can see that there are PHP pages for us to test in the directory

Let’s try typing in the browser address bar:

image

At this point, we should be able to see the PHP related pages.

2. Zend Studio

With the operating environment, we also need a powerful related environment. I personally recommend Zend Studio here.

I am using the latest version 7.1, don’t forget to register, haha!

3. Hello PHP

Okay, let’s develop the simplest PHP page.

Zend Studio 7.x and 6.x are both based on Eclipse, so they are very similar to Eclipse.

image

First let’s create a PHP Project and point the directory to our Apache directory.

Next, create a new PHP page.

image

Let’s write the simplest PHP code:

<span style="COLOR: blue"><?</SPAN><SPAN style="COLOR: maroon">php
</SPAN><SPAN style="COLOR: red">echo</SPAN>(<SPAN style="COLOR: blue">"Hello PHP"</SPAN>);

At this time, we can see the results.

image

Haha, let’s write it more like a web page.

<SPAN style="COLOR: blue"><</SPAN><SPAN style="COLOR: maroon">html</SPAN><SPAN style="COLOR: blue">>
<</SPAN><SPAN style="COLOR: maroon">head</SPAN><SPAN style="COLOR: blue">>
 <</SPAN><SPAN style="COLOR: maroon">title</SPAN><SPAN style="COLOR: blue">></span>HelloPHP<span style="COLOR: blue"></</SPAN><SPAN style="COLOR: maroon">title</SPAN><SPAN style="COLOR: blue">>
</</SPAN><SPAN style="COLOR: maroon">head</SPAN><SPAN style="COLOR: blue">>
<</SPAN><SPAN style="COLOR: maroon">body</SPAN><SPAN style="COLOR: blue">>
 <?</SPAN><SPAN style="COLOR: maroon">php 
  </SPAN><SPAN style="COLOR: red">echo</SPAN>(<SPAN style="COLOR: blue">"Hello PHP"</SPAN>);
 <SPAN style="COLOR: blue">?>
</</SPAN><SPAN style="COLOR: maroon">body</SPAN><SPAN style="COLOR: blue">>
</</SPAN><SPAN style="COLOR: maroon">html</SPAN><SPAN style="COLOR: blue">>
</span>

Is it more like a web page?

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321314.htmlTechArticle1. AppServnetwork First, let’s download some PHP related things. First, let's download a complete set of PHP-related tools-AppServnetwork. AppServ 2.5.10 php operating environment a...
Statement:
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