Home  >  Article  >  Relationship between HTML and PHP

Relationship between HTML and PHP

小云云
小云云Original
2017-11-06 11:12:0222368browse

Many novices who come to our website to learn on their own still have many things they don’t understand. What is the difference between HTML and PHP? Why do you need to master some basic knowledge of HTML first to learn PHP? The editor below will tell you the relationship between them.

First of all, html/css/javascript are all front-end and are executed and rendered by the browser. You can see the effect by opening it locally

php/asp/jsp are back-end programs that run on the server. They generate front-end code and send it to the client (browser). The front-end is also called static code, and the back-end is called dynamic code, which refers to a PHP file that can generate different front-end codes based on different parameters. If the server directly places an html file, it will be sent directly to the browser when the user requests the page.

Early websites were all static (html). There were as many html files as there were pages. 1,000 news items required 1,000 html pages. For dynamic websites such as php, only one php file was enough. , so it is called dynamic. Only dynamic websites can interact, such as user messages and so on.

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, so no one of them can do without the other.

Self-study novices should pay attention. At the beginning, optical HTML is not enough. You also need to learn js and css. Don’t worry too much. Follow the step-by-step tutorials on our website. You will learn it soon. of.

Relationship between HTML and PHP


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn