Home > Backend Development > PHP Tutorial > Mixed php and html

Mixed php and html

WBOY
Release: 2016-10-18 08:56:00
Original
1943 people have browsed it

I just learned PHP and am a complete novice. After reading a lot of tutorials, I wrote PHP in HTML. I felt that there was no separation and it was very bad. So I became suspicious of the tutorials. Is this the way it is originally or because I came into contact with the framework? Separation?

Reply content:

I just learned PHP and am a complete novice. After reading a lot of tutorials, I wrote PHP in HTML. I felt that there was no separation and it was very bad. So I became suspicious of the tutorials. Is this the way it is originally or because I came into contact with the framework? Separation?

If you understand the history and essence of PHP, you will find that this kind of mixing is actually the original usage of PHP, or its advantage. Isn’t it the reason why PHP became popular in the first place because of its rapid development? As for the later mvc, template engine, etc., they were all developed for the convenience of collaborative development and management. If you ask me which one is faster, native hybrid or framework mvc, I will tell you that it is definitely native hybrid. Therefore, you can use hybrid for small projects, and use frameworks for large projects. As for the tutorial, he did it right. As I said, PHP is just like that. You can say that frameworks are used for management convenience, coupling and other reasons, but you cannot put the cart before the horse when learning. The foundation is very important.

It should be said that they are written together for ease of understanding. In other words, PHP can also be written like this. After the basic skills are solid, taking into account code maintenance and multi-person collaboration, there should be a means of "separation" to ensure the "cleanness" of the code. If you are a novice, it is recommended that you just have this concept and "yearning" in mind. The most important thing right now is to follow the tutorials and master the basic skills.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template