Introduction to PHP and introduction to php
Introduction to PHP
What is PHP?
PHP (foreign name: PHP: Hypertext Preprocessor, Chinese name: "Hypertext Preprocessor") is a common open source scripting language. The syntax absorbs the features of C, Java, and Perl, which is easy to learn and widely used and mainly applies to the Web development field. PHP's unique syntax is a mix of C, Java, Perl, and PHP's own syntax. It can execute dynamic web pages more quickly than CGI or Perl. Compared with other programming languages, PHP embeds programs into HTML (an application under the standard General Markup Language) documents for execution, the execution efficiency is much higher than the CGI that completely generates the HTML Tag. PHP can also execute the compiled code to encrypt and optimize code execution, so that the code runs faster.
PHP development tools
- Zend Studio: commercial version, officially released by Zend, based on eclipse
- Eclipse with PDT: free
- Coda: commercial edition for Mac users
- NetBeans: free and powerful
- PHP Storm: Commercial Version
- Aptana Studio: free
- PhpEd: Commercial Version
- Komodo IDE/Edit: The IDE is a commercial version and can be used for free.
- Adobe Dreamweaver: Business Edition
What can PHP do?
- PHP can generate dynamic page content
- PHP can create, open, read, write, and close files on the server.
- PHP can collect form data
- PHP can send and receive cookies
- PHP allows you to add, delete, and modify data in your database.
- PHP can restrict user access to some pages on your website
- PHP can encrypt data
Why use PHP?
- PHP can run on different platforms (Windows, Linux, Unix, Mac OS X, etc)
- PHP is compatible with almost all servers currently in use (Apache, IIS, etc)
- PHP provides extensive database support
- PHP is free and can be downloaded from official PHP resources: www.php.net
- PHP is easy to learn and can run efficiently on the server.
Instance 1. Output Hello World!
<!DOCTYPE html>
Example 2: PHP knowledge flowchart PHP Stage 1 Web working principle PHP environment construction PHP open source project HTML + css php Stage 2 syntax data structure array object expansion SQL session cache PHP small project PHP Stage 3-side object advanced MySQLPDO algorithm encapsulation framework template engine PHP advanced project PHP Stage 4 container Message Queue Elasticsearch, redis optimization and security solutions for large-sized websites php tutorial