Some small knowledge about PHP!

Source: Internet
Author: User
Tags php language zend

Browse Directory:

First, PHP background and advantages;

Second, the introduction of the principle of PHP;

Third, the PHP operating environment configuration;

D. Write simple PHP code and test.

First, PHP background and advantages

1.1 What is PHP?

PHP is one of the tools that allows you to generate dynamic Web pages. PHP representative: Hypertext Preprocessor (Php:hypertext preprocessor). PHP is completely free and you can download it freely from the official PHP site (www.php.net).

Introduction to the PHP language:

PHP's unique syntax mixes C, Java, Perl, and PHP's self-innovative syntax. PHP is a dynamic page compared to other programming languages, PHP is to embed the program into the HTML document execution, execution efficiency than the full HTML markup of the CGI is much higher; PHP can also execute compiled code, compile can achieve encryption and optimize the code to run, so that the code runs faster. PHP has very powerful features and supports almost all popular databases and operating systems. 1.2 Advantages of PHPThe learning process is very simple: PHP's syntax is similar to C. Programmers with some programming experience can start your PHP code by learning some basic grammar and language features. Go through the relevant documents. Cross-platform: can run in Win32, *inux, FreeBSD and other compatible multiple Web servers such as: Apache, IIS, nginx development cost is low, open source projects, many extension libraries, including standard expansion library (SPL) and external expansion Library (PECL) to provide a variety of database access interfaces , and supports ODBC, provides PDO (Common Database system Interface) Development efficiency, function statements concise and clear, built-in functions rich support object-oriented and process-oriented 2 styles of application, the World programming language top two, PHP principle introduction: 1. We have never manually opened the relevant process of PHP, it is running with Apache boot;
2. PHP is connected to Apache via the Mod_php5.so/php5apache2.dll module
3. PHP has a total of three modules: the kernel, the Zend engine, and the expansion layer;
4. The PHP kernel is used to handle requests, file streams, error handling and other related operations;
5. The Zend Engine (ZE) is used to convert the source file into a machine language and then run it on the virtual machine;
6. The extension layer is a set of functions, class libraries, and streams that PHP uses to perform certain operations. For example, we need MySQL extension to connect to MySQL database;
7. When Ze executes the program, it may be necessary to connect a number of extensions, then Ze will control to the extension, and so on after the specific tasks are processed and then returned;
8. Finally, ZE returns the result of the program run to the PHP kernel, which then transmits the results to the SAPI layer, which is eventually output to the browser.     PHP running Environment Configuration A) Manual build: Download the required package: apache2:http://httpd.apache.org/, MYSQL5:HTTP://DEV.MYSQL.COM/DOWNLOADS/MYSQL/PHP5: HTTP://WWW.PHP.NET/DOWNLOADS.PHPB) Integrated Quick build: Integrated installation package for the Windows platform: XAMPP, Wamp, Phpnow, phpstudy etc. i suggest: XAMPP HTTP://WWW.A pachefriends.org/zh_cn/xampp.html; What I'm introducing below is the integration quick build:Test address: http://localhost:8080/or http://127.0.0.1:8080/, the following page appears, congratulations, installation success! Resources:

apache2:http://httpd.apache.org/,

mysql5:http://dev.mysql.com/downloads/mysql/php5:http://www.php.net/downloads.php XAMPP:http:// Www.apachefriends.org/zh_cn/xampp-windows.html

Some small knowledge about 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.