Home > Article > Backend Development > Learn PHP. Let's talk about how novices can learn PHP. The silent classic version.
Let’s talk about how novices learn PHP^_^
Author: Momo
There are so many contact information listed at the beginning of the article, which will inevitably make everyone feel a bit like AD, but there is no doubt that Momo does have that little bit of desire for expression^_ ^, Although sometimes people call you a mother-in-law if you are too meticulous, but fortunately, this kind of meticulousness is quite beneficial to programming! Starting from Momo Mo asking others how to learn PHP, later many people came to ask Mo Mo Mo how to learn PHP. No matter Mo Mo is a novice or an experienced player, Mo Mo always seems to be unable to find a clear clue. However, Mo Mo Now that I have learned PHP, the path I took is more or less useful for reference. I don’t need to go into details about the background of PHP. I believe that when you choose a language, it is not based on its background and long history, but more importantly on its
practicability
. Even a flashy language has a glorious history. , is about to decline. Fortunately, PHP has withstood the test, and therefore, it is indeed a language worth learning. Mo Mo has always grown up listening to other people’s experiences. Therefore, based on the experience of his predecessors, Mo Mo has taken many detours and stepped into the right track faster. I would like to express my gratitude to those seniors whose names I don’t even know. Thank you to everyone. In Momo’s eyes, no matter how big or small the help is, as long as it is help, it will always make Momo’s heart warm. I think the seniors helped me not just to get a thank you from me, but more because of the help. Out of a sense of responsibility and an expectation of silence, I think that only by learning PHP well can I be worthy of the sweat of my predecessors. As I said, Mo Mo finally feels a sense of responsibility. Mo Mo doesn’t know how much his experience can help novices, but Mo Mo understands that now is the time to fulfill his responsibilities. It is necessary for me to tell everyone about my experience. Those who hope to learn PHP well, only in this way can China's PHP continue to progress and develop, and occupy a place in the world.
During this period of silently learning PHP, I feel that the domestic PHP environment is becoming more and more mature, and the standards are gradually improving. The establishment of PHPCHINA marks that the PHP organization directly linked to the official has officially settled in China. I would like to offer my belated greetings. applause!
Okay, let’s get to the point:
Before I talk about my own learning methods, I want to say something from my heart to those who hope to get useful information from my articles:
Silent articles will not play a role in your learning. Substantial effect, whether you can succeed or not depends on yourself.
Persistence, persistence, persistence is the only way to success. I will first summarize my own process of learning PHP:
(1) Be familiar with basic elements of web pages such as HTML/
CSS/JS. At the completion stage, you can makecomplete web pages by yourself, and be familiar with element attributes . Program
out out out out out out of
using Many enthusiasts who learn PHP coincidentally. This can be regarded as a step-by-step learning process. However, novices should not think that learning is quite simple after seeing the above summary. I have to pour cold water on you here, any In fact, everything is not simple, even the sesame cakes in the snack bar are not made at once. Let me first explain my learning ideas. First of all, after understanding the concept of website, it is not difficult to see that any website is composed of web pages. In other words, if you want to complete a website, you must first learn to make web pages. Therefore, you must master HTML to lay the foundation for making websites in the future. Base. When learning HTML, I think learning by doing is the most effective way
. Of course, this method is also the most effective for learning PHP.
Every element in HTML must be practiced personally. Only after understand what elements will have what effect, you will have a deep memory, and blindly chewing books will definitely not work. I think most novices Therefore, I feel that concepts are difficult to learn, mostly because of the word "lazy". Laziness is the biggest enemy that prevents progress. Therefore, only by overcoming the habit of laziness can you learn something faster.
Maybe when you are learning PHP, you just want to develop a website as soon as possible, and you will also want me to make a website. Why do you need to learn such trivial things as web pages? It is not difficult to see that there are many novices who have high vision but low ability. This kind of thinking is undoubtedly building a castle in the air. If you don’t build a foundation, how can you get a roof? OK, Mastering the technology of making static web pages is a prerequisite for learning to develop websites
. That’s it for now. Because this article is not a tutorial article, it will not provide an in-depth analysis of the technology. I assume that you can now complete a static page. Of course, whether it looks good or not is another matter. Momo’s first web page is not good either, but no matter how ugly the "child" is, we are "parents" You can't dislike it, right? After all, this is our achievement. Then let’s start learning the concept of dynamic language. Many people may be confused when they first come into contact with dynamic language. Why is this messy thing different when it is displayed on the web page? In fact, this is not a mess. Isn’t the HTML
code
you write also just a bunch of characters ? After all, the code is not directly output, but processed. To put it bluntly, HTML passes through the HTML parser, and PHP of course also passes through the PHP parser. It is the same as learning HTML. If you want any For parsers to do their job, they must use their own specialized syntax constructs, so it's no wonder that PHP looks weird. Understanding PHP is the most difficult threshold for novices to cross, but you should feel lucky that PHP has tried its best to cater to novices. If you have learned other languages, you may feel that PHP is indeed quite good. Simple, but if you have never learned anything before, then bite the bullet and think about it.
You will become familiar after reading it three times. This simple truth tells us that even if you can’t understand PHP, you must first become familiar with it, read it, read it over and over again, think about it while reading, and follow it When it comes to coding, even if you don't know what the codes are for, at least you should get a feel for it. After a period of struggle, you, the smart one, have obviously gradually become enlightened and slowly understood the concept of programming. Congratulations, you have taken the first step to success.
Understand the concepts of HTML and PHP, then mixed programming of PHP and HTML should not be a problem. During this period, you can let PHP calculate for you how much one plus one equals, and then output it in the browser. Don’t feel naive. This is indeed the same as the Apollo moon landing. You are typing a small piece of code, but it is a big step forward in your programming journey! Excited? But I have to pour some cold water on you, you are still a rookie. After you have been happy for a while
time
, you must continue to work hard. The next step is to learn datadatabase. MYSQL can be regarded as the golden partner of PHP. However, even though that is said, you may also want to eat MYSQL alive, because The rows and rows of stuff made me dizzy.
Dizziness is dizziness, and dizziness is dizziness. You can’t bite your tongue while eating and then stop eating, right? Put down your fear and keep working hard, We are here to conquer it, not to be conquered by it, cheer up, comrade. After a lot of struggle, you finally understand the concept of database, and what makes you excited is that you can finally connect to the database through PHP. How did you learn during this period? We will not verify it, but it turns out that, You already can. Having learned PHP and database, you are undoubtedly holding MOTOLOLA in your left hand and NOKIA in your right hand. Be more chic and chic, haha, I finally learned it, but maybe at this time, someone will inadvertently pat you on the shoulder and say :Dude, don’t be too happy, you are still a rookie and there is still a long way to go before you learn!
When you work hard and learn to successfully insert, delete, and update data using PHP, it is obvious that you are just around the corner from success.
You may be in this state at this time:
Do you know HTML? Yes, I can edit several web pages with large tables and layouts!
Do you know PHP? Yes, I will write the operation of one plus one in the function and then call it!
Do you know MYSQL? Yes, I will insert and delete my information in the database
Then, what should you do next? I think if you give your skills a try, you’ll probably be fine. Then I’ll give you a task and make a guestbook. This is comparable to HELLO WORLD! ^_^, it is also the first hurdle faced by novices.
It took a while, but you finally learned to insert the data from the form into the database and then displayed it . It should be said that the prototype of a program has been born.
But you may look here and there, this editor forum, that CMS, and that CRM, when will I write one?
Don’t worry, it can be said that your horse stance is almost done, and it’s time to start practicing the postures. If possible, use a pen or print a simple PHP manual on your body, and touch it out from time to time. Look, remember, don’t miss it even if you go to WC (^2^).
If you have the conditions, buy this book and read it. "PHP+MYSQL WEB Development (Third Edition)" is known as the Bible, (maybe a good choice) (Disclaimer: The author did not give me any benefits, and I am not a book trustee. , from all this distance, I have never even met his brother before saying -_-)
After consolidating my knowledge and becoming familiar with the essentials of PHP and MYSQL development, I will look back at the guestbook you wrote, You may wonder if it was really written by you? Of course, if there is a ghost in the house, maybe it was written by it -_-
At this time, your guestbook should have registration and paging functions, and if you If it is stronger, the UI (user interface) can also be enhanced. After completion, do you feel a special sense of accomplishment? Anyway, we have written a dynamic website program, let's play with it on our own website, and it will be good. Friends, come and take a look, hey, look at what I wrote, and then promote it online
A few days later, you open the guestbook, eh? Wow, N number of pages pop up at once! Obviously, your guestbook is not there! Take security precautions, I was slightly fooled by someone using JS code. I sympathize with your feelings at this time, but there is no other way. Keep working hard!
You have worked hard and become familiar with security issues. , and then designed some programs, and it feels pretty good.
So, now you have learned it? NO, NO, NO, it’s still early. You haven’t touched OOP yet, right?
, learn! Keep learning and learning. After learning this, you have learned to generate static web pages. Now you should be exposed to XML. Well, you also understand XML, so AJAXYou have to be exposed to AJAX, right? ...Then...
All in all, you will never find that you have learned everything. Some real strong people will always come up with new things to throw to you. If you don't learn, you will fall behind, which also confirms the experience of the predecessors. , as expected Learning is endless!
I think through my YY, you should also be familiar with some learning processes. Maybe my process has some solutions to yours, but no matter what, we reach the same goal. I write like this There are many, and it just gives everyone an opportunity to learn from it. As for whether it is good or bad, I dare not guarantee it in silence ^0^
After reading it, you find that it is so wordy and of no use to me. I know how to learn. But I think how can I learn faster, a one-week crash course, ah no, a 24-hour crash course, Momo, do you have one?
I... I don't, but I will put you in the hospital within 2 minutes. , I am confident -_-
Never expect quick results when learning something I told you a way, but it is useless if it lacks the hard work
But there is one thing I can guarantee you. That is, if you learn PHP, you will definitely learn other languages quickly. The same is true, if you have learned other languages before, then you will definitely learn PHP quickly.
But the grammar is easy to learn, but how to use the grammar to achieve everyone's success. There is a way for everyone, almost in their own way. However, it is definitely beneficial to learn from other people's successful codes. Therefore, looking at those classic codes that have been refined over time is the best way to advance.
Having said so much, I just want to say: Learning PHP requires not only mastering the method, but more of sweat . I don’t want to see people who give up midway. Believe in yourself, your choice, and more importantly, your own will. Ability, if you want to give up and be more violent, just slap yourself in the mouth and yell: Others can do it, why can’t I? (Doesn’t it sound like Coach Yama? It’s true that Mo Mo has watched too many movies and it will hurt if he slaps his mouth. You just need to understand this truth.)
Another thing I want to remind you is, Resist temptation, ASP/PHP/JSP /.NET may make you at a loss. You may have learned half of PHP and started to think about C# again, or someone said that JAVA is very strong. You must not be swayed at this time, even if you really want to learn it. Have to learn PHP. Then learn again, The most undesirable thing is to change your mind when you see something different. This is the principle of being a bear and breaking the corn. If you often give up midway, you can only gain nothing and waste a lot of time and experience. The gain outweighs the loss. The most important thing is that you will be Others look down on you. No one likes to make friends with people who have different ideas, because such people are too restless and unreliable. Therefore, you must force yourself to achieve your goals, even if it may be uncomfortable, you must persist. Perseverance is This is how I got trained.
The above introduces learning PHP and talks about how novices learn PHP. The silent classic version includes content about learning PHP. I hope it will be helpful to friends who are interested in PHP tutorials. Maybe everyone finds me annoying after saying so much, but Mo Mo belongs to the kind of person who is usually very silent. Once he enters the state, he becomes very excited. I want to express what I think as much as possible, but Unfortunately, my writing skills are limited and the effect may not be satisfactory, but I feel that after sharing my experience, I feel very relaxed and relieved.
Finally, I would like to say that there are many Chinese people who are not confident and have said that the language changes when it comes to China, and that Chinese people are not united and have no team spirit. On the contrary, I think those people are short-sighted, pathetic, and deplorable. , those people always shirk all responsibilities, but do not start from themselves and set an example to change this situation . Instead, they sigh pessimistically and only hope that those people will wake up soon. Only if everyone works hard Only by doing so can we make progress, but by feeling inferior to ourselves will only make things worse.
In fact, whether it is PHP or anything else, we do not learn it. If we learn it, we must make a name . One person's power may be insignificant, but everyone works hard and works together. What can't the Chinese do? We must not only catch up, but also surpass, and make the world use "Chinese standards." Maybe when I say this, some people say that I am wishful thinking, and some people say that I can only shout slogans. It doesn't matter, but the important thing is that I finally put it into practice. The words in my heart came out. To put it bluntly, we Chinese people do not lack strength, but we lack ambition. Ambition is not a derogatory meaning. The ambition referred to here refers to the ambition of the Chinese people to dare to be the first in the world. Having said so much, I digress again^_^. In fact, I encourage us novices to learn PHP to work hard. China’s development depends on us! (That’s an exaggeration, please don’t be offended! Please speak boldly^_^)Hehe!