Learning routes and advice for beginners in PHP

Get straight to the point 
1. Familiar with basic elements of web pages such as HTML/CSS/JS. In the completion stage, you can make simple web pages by yourself, and you are relatively familiar with element attributes. 
2. Understand the concept and operation mechanism of dynamic language, and be familiar with basic PHP syntax. 
3. Learn how to combine PHP and HTML to complete simple dynamic pages. 
4. Get in touch with MySQL and start designing the database. 
5. Continue to consolidate PHP syntax, familiar with most common PHP functions, understand object-oriented programming, MySQL optimization, and some templates and frameworks. 
6. Finally complete a fully functional dynamic site. 
 
Thinking before learning PHP 
Newbies should not see the above summary and think that PHP learning is very simple, and programming requires your serious thinking and continuous practice. The following is a detailed explanation of the PHP learning line. First of all, any website is composed of web pages, that is to say, if you want to complete a website, you must first learn to make web pages, and mastering the production technology of static web pages is a prerequisite for learning to develop a website. Therefore, we need to learn HTML to lay the foundation for the future production of websites. Learning HTML should be done while learning, and any element in HTML must be practiced by yourself. Only after you understand what elements will play a role, can you deeply remember them. Blindly reading is not enough.
 
Understand HTML before learning PHP Assuming that you can already complete a static page, then it is time to start to understand dynamic language. When you first come into contact with dynamic language, many people may have a lot of confusion. The code is not directly output, but has to go through For processing, HTML goes through the HTML parser, and PHP also goes through the PHP parser. It is the same as learning HTML. If you want any parser to work, you must use its special syntax structure. You should feel lucky to learn PHP, because if you have learned other languages, you will find that PHP is relatively simple. At this stage, you need to understand the concepts of HTML and PHP. You can now let PHP do the math for you. One plus one equals several, and then output in the browser. Don't feel naive, although this is a small piece of code, it is a big step forward in your programming journey. But right now, you're still a rookie. 
 
Before learning PHP, you need to know MySQL
The next step is to learn the database. MySQL can be said to be the golden partner of PHP. We need to conquer this database. After you understand the concept of the database, you must try to connect to the database through PHP, and then use PHP to successfully insert and delete. and update data. At this point, you may be in this state: do you know HTML? Yes, I can compile several web pages with tables and layouts! Do you know PHP? Yes, I will write the one plus one operation in the function, and then call it! Do you know MySQL? Yes, I can insert and delete data in the database! So what to do next? Try to be a small guestbook, this is also a hurdle for newbies. It took a while for you to finally learn to insert the data of the form into the database, and then display it. It should be said that the prototype of a program has been born. However, you may look at other people's editor forums, that develop CMS, when can I write one? Don't worry, consolidate your knowledge again. After you are familiar with the essentials of PHP and MySQL development, and then look back at the guestbook you wrote, you may wonder if it was really written by you? At this time, you can improve the guestbook you wrote. The message book should be added with the functions of registration and paging. If possible, the UI can also be enhanced. 
 
When you develop, you will choose a PHP framework 
. Is this even a learning? NO, NO, NO, it's still early, you haven't touched OOP yet, have you? What about templates and frameworks? Continue to study! The PHP framework provides a basic framework for building web applications, thereby simplifying the process of writing web applications in PHP. It can save development time and help build more stable applications. So, a PHP framework is a tool you can use to save time and enhance your own code. When you choose a PHP framework for the first time , it is recommended to try several, each framework has its own strengths and weaknesses, for example, the Zend framework has been popular for a long time due to its variety of functions and has an extensive support system. CakePHP is a PHP framework later than Zend, and the corresponding support system is relatively small, but it is more convenient and easy to use. After understanding object orientation and frameworks, you should touch XML, all in all, you will never find that you have learned it all, there is no limit to learning! To learn something, never delusional saying that there is a quick success, no matter how many skills, but lack of effort, it will be in vain. One thing is guaranteed, that is, if you have learned PHP, then learning other languages ​​will definitely speed up, and vice versa, if you have learned other languages ​​before, then learning PHP will definitely be faster. 
 
It is absolutely beneficial and harmless to read and learn 
from others' successful codes, so it is the best way to improve by reading more classic codes that have been hardened and condensed. In addition, it should be emphasized that in the process of learning a technology, you may encounter difficulties and may be confused. You may have learned half of PHP and started to think of C#, or someone said that Java is very good. At this time, you must not Shake, stick to the end, and learn thoroughly. PHP is the best development language in the world. You can definitely develop the website you want.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326801028&siteId=291194637