Experts pass on the teachings. The key to learning PHP is persistence_PHP Tutorial

WBOY
Release: 2016-07-20 10:56:57
Original
962 people have browsed it

I believe that when you choose a language, it is not based on its background and long history, but more importantly on its practicality. A flashy language will eventually decline, even if it has a glorious history. The good news is that PHP has withstood the test, and therefore, it is indeed a language worth learning.

I summarized that the process of learning php may need to go through the following stages:

(1) Familiar with basic elements of web pages such as HTML/CSS/JS, completion stage You can create a complete web page by yourself;

(2) Understand the concept and operation mechanism of dynamic language, and be familiar with PHP syntax;

(3) Learn how to combine PHP and HTML to complete simple dynamics page;

(4) Get in touch with MYSQL and start designing database programs;

(5) Continue to consolidate, understand most of the common PHP functions, and understand OOP, MYSQL optimization, and templates;

(6) Complete a fully functional dynamic site.

My route may coincide with many enthusiasts who learn PHP. This is also a step-by-step learning process. However, novices should not think that learning is quite simple after seeing the summary above. I have to pour some cold water on you. Nothing is actually simple, even the sesame seeds 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 in order to prepare for the future. Lay the foundation for making a website.

I think learning while doing is the most effective way to learn HTML. Of course, this method is also the most effective way to learn PHP.

Any element in HTML must be practiced personally. Only after you understand what element will have what effect, you will remember it deeply. Blindly reading books will definitely not work. I think most novices The reason why concepts are difficult to learn is mostly due to the word "lazy". Laziness is the biggest enemy that hinders progress. Therefore, only by overcoming the habit of laziness can you learn something faster.

Perhaps when you are learning PHP, you just want to develop a website as soon as possible, and you will also think about me making 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 ambitions but low ambitions. This kind of thinking is undoubtedly building a castle in the air. If you don't build a foundation, how will you get a roof?

OK, mastering the production technology of static web pages is a prerequisite for learning to develop websites. This point will stop here. 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 is good-looking or ugly is another matter. The silent first webpage is not that good, but no matter how ugly the "child" is, we You can't dislike being a "parent", 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 a bunch of characters? After all, the code is not output directly, but processed. To put it bluntly, HTML passes through the HTML parser, and PHP of course passes through the PHP parser. It is the same as learning HTML. If you want any parser to To accomplish operations, you must use their specialized syntax constructs, so it's no wonder that PHP looks strange.

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 It is indeed quite simple, but if you have never learned anything before, then bite the bullet and think about it.

You will become familiar with it 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 over and over again, and think about it while reading. While typing code according to what it teaches, even if you can't figure out what those 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 I feel naive, but this is indeed the same as the Apollo moon landing. You typed a small piece of code, but it was 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 being happy for a while, you must continue to work hard. The next step is to learn databases. 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 you learned it during this period, we will not verify. , but it turns out, you already can.

Having learned PHP and database, you are undoubtedly holding a MOTOLOLA in your left hand and a NOKIA in your right hand. Be more chic and chic, haha, I finally learned it, but maybe at this time, someone will inadvertently take a picture. I pat you on the shoulder and say: Brother, don’t be too happy, you are still a rookie and you are still a long way from learning!

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 compile 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 form data into the database and then displayed it. It should be said that the prototype of a program has been born.

However, you may look at this 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 you. Take it out from time to time and take a 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, I’m not a book supporter either. I’m so far away and I haven’t even met his brother before saying that -_-)

After consolidating my knowledge and becoming familiar with the essentials of PHP and MYSQL development, Looking 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 message book should have registration and paging functions, and if you are stronger, the UI (user interface) can also be enhanced. After completion, do you feel a sense of accomplishment? Anyway, we have written a dynamic website? Program it, put it on your own website, let your friends take a look, hey, look at how great our writing is, and then promote it online

After a few days, open the guestbook. , Huh? Wow, so many pages popped up at once! It’s obvious that your guestbook was not properly protected and someone used JS code for a little trick. I sympathize with your feelings at this time, but nothing else. You’ve figured it out, keep working hard!

You worked hard, got familiar with the security issues, and then designed some programs, and it feels good.

So, now you have learned it? NO, NO, NO, it’s still early. You haven’t touched OOP yet, right?

Well, learn it! After learning this, you will learn it again. Generate static web pages. Now you should be exposed to XML. Well, you also understand XML, so you have to be exposed to AJAX, right? AJAX is over...

In short, you will never find that you have everything Once you learn it, some real strong people will always come up with new things to throw at you. If you don’t learn, you will fall behind. This also confirms the experience of the predecessors. There is really no end to learning

I want to pass it by me! After some YY, you should also be roughly familiar with some learning processes. Maybe my process has some solutions to yours, but no matter what, they are different paths to the same goal. I write so much just to give everyone a chance to learn from it. As for whether it is good or not Okay, I don’t dare to 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 want to learn how to learn faster. A quick fix in one week, ah no, a quick fix in 24 hours, Momo, do you have it?

I...I don't, but I'm pretty sure I'll put you in the hospital within 2 minutes -_-

Never expect a quick fix when learning something. It tells you a way, but if it lacks the hard work, it will be in vain

But one thing I can guarantee you is that. , if you have learned 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 it. Everyone has their own way of realizing it, almost in their own way. However, it is definitely beneficial to learn from other people's successful codes. Therefore, looking at classic codes that have been refined over time is the best way to advance.

After talking so much, I just want to say: Learning PHP requires not only mastering the method, but also sweating. I don’t want to see people giving 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 a bit 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 to resist temptation, ASP The comparison of /PHP/JSP/.NET may make you at a loss. You may have learned half of PHP and then started to think about C#, or someone said that JAVA is very strong. At this time, you must not be swayed, even if you really want to learn. You also have to learn PHP.

Then learn again. The most undesirable thing is to change your mind when you think differently. This is the principle of breaking the corn when the bear breaks the corn. If you often give up midway, you will gain nothing and waste a lot of time and experience. The gain outweighs the loss. The most important thing is , you will be looked down upon by others, and no one will like to make friends with people who have different ideas, because such people are too restless and unreliable. Therefore, you must force yourself to accomplish your goals, even if it may be uncomfortable. Persistence, this is how perseverance is developed.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445816.htmlTechArticleI believe that when you choose a language, it is not based on its background and long history, but more importantly on its Practicality, flashy language, no matter how glorious the history, will eventually decline...
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