Home >Backend Development >PHP Problem >What is the relationship and difference between php and html
Relationship: PHP is an upgraded form of HTML language, and its language structure still takes HTML as the core; let’s put it this way, HTML is a piece of white paper, then PHP is an airplane folded out of white paper. Difference: HTML is mainly used for display on the client side, and PHP is mainly used for processing information submitted by customers through web pages. It runs on the server side.
The operating environment of this tutorial: windows7 system, PHP7.1&&html5 version, DELL G3 computer
The relationship between php and html
PHP is an upgraded form of HTML language, and its language structure still takes HTML as its core. Let's put it this way, HTML is a piece of white paper, then PHP is an airplane folded out of white paper. PHP is more functional than HTML.
html collects data and submits it to php for processing, and then php returns the data to html for display! To take the simplest example, when you register for a web game, the registration page you see is an HTML page. Then after you enter the user name and password, when you click Confirm, the data will be submitted to the PHP page for processing. The PHP page will process your The submitted data is processed, and if it meets the requirements, the successful information will be returned to the html page. This is simple enough!
The difference between php and html
HTML is a hypertext markup language; PHP is a "hypertext preprocessor" and is a general open source scripting language. PHP's unique syntax is a mix of C, Java, Perl, and PHP's own innovative syntax.
HTML is mainly used for client display. For example, the web pages we browse, especially static web pages, are all written in html language. You can see the html code by right-clicking on the web page and viewing the source file. .
PHP is the language of the server. It is mainly used to process information submitted by customers through web pages. It runs on the server side and is used to respond to customer requests. It can execute dynamic web pages faster than CGI or Perl. Compared with other programming languages, dynamic pages made with PHP; [Recommended learning: "PHP Video Tutorial"]
PHP embeds programs into HTML documents for execution. The efficiency is much higher than CGI that completely generates HTML tags; PHP can also execute compiled code, and compilation can achieve encryption and optimization of code running, making the code run faster. PHP has very powerful functions. PHP can realize all CGI functions and supports almost all popular databases and operating systems.
For more programming related knowledge, please visit: Programming Video! !
The above is the detailed content of What is the relationship and difference between php and html. For more information, please follow other related articles on the PHP Chinese website!