Introduction to PHP

Source: Internet
Author: User

What 1.php is and how PHP is evolving

PHP is a hypertext preprocessing language, hypertext preprocessor

PHP is a lightweight language, a weak type of language, its syntax is a combination of java,c language, Perl language, and its own original grammar

Development of PHP:

In 1994, when Redorf graduated from university, the Perl language developed a Personal web page, made a statistical flow of procedures, continued to improve, to the later two Israelis, also constantly perfected,----php3.0

Now the Zend Company acquired them and they maintain PHP

Development Prospects for PHP:

English world: In January 2013, PHP ranked first, now the top six

PHP developed by the website: Twitter (Weibo), Facebook (Xiaonei), groupon.com (group purchase)

Advantages of 2.php

Open source, code Open, PHP projects can find his source code on the Internet, the benefits: High Security

Highly cross-platform and can be ported directly to Unix,linux,windows,macos

High efficiency, fast parsing speed

Object oriented

Lamp (linux--apache--mysql--php) Gold combination

3. Write a PHP file

(1) Unified environment, wamp5.0

(2) file name, try to use English, Hanyu Pinyin, eliminate the use of English or special symbols

(3) Code: UTF-8, do not use Utf-8+bom (usually open after the notebook will display such encoding, as far as possible to open with the Code editor)

(4) When the code is written, the indentation should be indented to keep the code beautiful

How to access 4.php files

PHP as an Apache module exists, access to the time must go through the Apache server parsing (call Php5_module this module to parse)

In the php file, you can write HTML, CSS, JS code, but in the HTML file cannot nest PHP code

Markup for 5.php languages

The longest used <?php?> recommended, if there is no code behind the?> end tag, can not write the end tag, it is recommended not to write

<? ?> short flag, will be disabled by the administrator, not recommended to use

<%%>asp style of writing

In PHP files, encountered <?php?> These tags, will parse, if not these tags, will directly return the code to the browser to display

Configuration file for 6.php

php.ini file, turn on short and ASP style tags

Use semicolons to separate the different statements

Statement:

function execution statements, to be separated with semicolons

Structure statement if () do not use semicolons to separate

Comments:

Single-line Comment://

Multi-line Comment:/**/

Introduction to PHP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.