Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What is php? What can PHP do?


May 30, 2021 Article blog


Table of contents


1. What php?

A server-side HTML scripting/programming language that is simple, object-oriented, explanatory, robust, secure, very performance-independent, architecturally independent, portable, and dynamic scripting language. i s a versatile scripting language that is widely used in Open Source and is particularly suitable for Web development and can be embedded in HTML. I ts syntax is close to C, Java, and Perl, and is easy to learn. This language allows Web developers to quickly write dynamically generated Web pages.

PHP Meaning Early PHP: Personal HomePage, Rasmus Lerdorf Late PHP:PHP:Hypertext Preprocessor, Hypertext Preprocessor, Hypertext Preprocessor

PHP is a scripting language. Programming language: A language scripting language that needs to be compiled before execution: it is an interpretive language

What can 2.PHP do?

PHP can do anything, but in many cases it requires additional plug-ins. P HP is done on a dynamic website. (web) web 1.0: Static Web sites (both require static pages that already exist and do not require any interaction with the database), and usually request files are .html/htmweb2.0: dynamic Web sites where users can interact with the server (the server is able to interact with the database)

PHP is responsible for processing requests submitted by users, associating with the database, and interacting with the phP operating database for data.

3.PHP history of development

1994:1.0: Profile, perl (script language)1996:2.0:C language underlying 1998:3.0:zendEngine (zend development) 2000:4.0:session plus output buffer, etc. 2004:5.0:zend engine 2 generation (perfect PPH object-oriented turn)

Where does the 4.PHP run?

PHP is a server-side scripting language.

5. What is a server?

A computer with server software. Server software: Apache, tomcat, iis, ftp, http, SVN

A computer with Apache is called a web server.

6. Software structure No matter what kind of structure needs networking to be able to work.

c/s:client/server, client/service side, must run both client and service side to be able to use the software. b/s:browser/server, browser/server (side), accessible as long as there is a browser (a special c/s structure)

7. Communication IP between computers:

One address domain name that uniquely identifies a computer: Domain Name, an alias for an IP address, is designed to facilitate user access to the corresponding "computer" hosts: the local domain name resolver domain name server: the domain name to find the corresponding IP address for the domain name

What does 8 .html do?

Used to standardize the display format of the data to ensure that each user sees the same results.

Web Works Site: A collection of multiple pages.
User access: URL: The absolute path to the Internet
Webmaster: A site is a folder (the absolute path locally)

A request for a static page

Request steps:

  1. In the browser, the user enters the domain name of the website that needs to be accessed and the web file that is specifically requested
  2. Domain name resolution: find the local hosts file first, then look for DNS on the Internet
  3. The web server receives the request to get the request file index .html
  4. The web server returns the index .html
  5. The browser parses the html code to display the data

Requests for dynamic pages:

Request steps:
  1. In the browser, the user enters the domain name of the website that needs to be accessed and the web file that is specifically requested
  2. Domain name resolution: Look for local hosts files and then DNS on the Internet
  3. The web server receives the request to get the request file index .php
  4. Leave the index .php file to the php engine for processing
  5. The php engine parses the php code, calls the mysql extension if you want to connect to the database, manipulates the database, and eventually parses it into an html file
  6. The php engine hands over the generated html file to Apache
  7. The web server returns the final html file obtained by index .php
  8. The browser parses the html code to display the data
     What is php? What can PHP do?1

The time zone for modifying php is modified in php's profile. /php/php.ini
 What is php? What can PHP do?2
Note: Apache needs to be restarted before it takes effect