How to get started with PHP

Source: Internet
Author: User

I am afraid you will not have to go into details about the background of PHP. I believe that choosing a language is not based on its background and long history. More importantly, it depends on its practicality, the flashy language, even if it is a brilliant history, will also fall. Fortunately, PHP has stood the test. Therefore, it is indeed a language worth learning.

The general process of learning PHP:

  1. Familiar with HTML, CSS, JS, and other basic webpage elements. You can create a complete webpage at the completion stage to familiarize yourself with the element attributes.
  2. Understand the concept of Dynamic Language, operating mechanism, and familiarity with PHP syntax
  3. Learn how to combine PHP with HTML to complete simple dynamic pages
  4. Contact MYSQL and start designing database programs
  5. Continue to consolidate, find out most common PHP functions, and understand OOP, MYSQL optimization, and templates.
  6. Complete a full-featured dynamic site

This line may coincide with many PHP enthusiasts. It is also a step-by-step learning process. However, it is quite simple for new users not to see the above summary, I have to pour cold water on you, but nothing is simple. Even the bread in the snack area is not made at once.

First of all, it is not difficult to understand the concept of a website. Any website is composed of webpages. That is to say, to complete a website, you must first learn how to create a webpage. Therefore, you must master HTML, in order to lay the foundation for future website production.

In learning HTML, I think it is the most effective way to learn and do it. Of course, this method is also the most effective way to learn PHP.

Any element in HTML must be put into practice in person. Only after you understand the effect of any element can you remember it deeply. However, it is absolutely impossible to read a book blindly, I think most new users think that concepts are hard to learn. Most of them are "lazy". Lazy is the biggest enemy to prevent progress. So they can learn one thing faster by overcoming lazy habits.

When you are learning PHP, you only want to develop a website as soon as possible. You will also want to develop a website. Why do you want to learn some webpages, such as pediatrics? It is not hard to see that there are not a few novice users with low eyes. This idea is undoubtedly used to build a castle in the air. If you do not have a foundation, how can you build a roof?

OK. Mastering the production technology of static Web pages is a prerequisite for learning to develop websites. This is mentioned here, because this article is not a tutorial article, it will not conduct in-depth analysis on the technology.

So let's start to learn about the concept of dynamic language. When we first got into touch with Dynamic Language, many people may be confused. Why is this messy thing displayed on the webpage another thing? In fact, this is not a mess. Isn't the HTML code you write a bunch of characters? After all, the Code is not directly output, but processed. To put it bluntly, HTML is through the HTML Parser, and PHP is also through the PHP parser, just like learning HTML, if you want any parser to complete the operation, you must use their special syntax structure. It is not surprising that PHP looks strange.

Understanding PHP is the most difficult threshold for new users, but you should feel lucky that PHP has reached the maximum limit for new users. If you have learned other languages, PHP may be quite simple, but if you haven't learned anything before, you can think about it.

The simple principle tells us that even if you cannot understand PHP, you must first get familiar with it and read it over and over again, at the same time, you can think about Code as it teaches. Even if you don't know what the code is, you should at least look for it.

After a struggle, you are smart, obviously enlightened, and gradually understood the concept of programming. Congratulations, you have taken the first step of success.

After figuring out the concept of HTML and PHP, PHP and HTML mixed programming should not be a problem. During this period, you can let PHP calculate the sum of one and one equals to a few, and then output them in the browser, don't be naive. This is indeed the same as Apollo's moon landing. You are playing a short piece of code, but you have taken a big step in programming! Excited? But I have to drop you some cold water. You are a cainiao.

Happy for a while, we must continue to work hard. The next step is to study the database. MYSQL can be regarded as the golden partner of PHP. However, even though this is the case, you may also wish to swallow MYSQL, because this line of stuff is just dizzy.

Dizzy to dizzy, dizzy to dizzy, you can't eat when you bite your tongue, don't you? Let go of fear and continue to work hard. Let's conquer it, rather than be conquered by it. Let's cheer up, comrade.

After some battles, you finally understood the concept of a database, and you are excited that you can finally connect to the database through PHP. How did you learn this during this period, we won't go into the research, but it turns out that you can.

If you have learned PHP and database, there is no doubt that you are holding MOTOLOLA in your left hand and NOKIA in your right hand. How cool and cool you are, haha, and finally learned, but maybe at this time, someone may casually pat the shoulder and say to you: Dude, don't be so happy too early. You're a newbie. It's a big difference from learning!

When you have worked hard to use PHP to successfully insert, delete, and update data, it is clear that you are just waiting for a while.

You may be in this status at this time:

Do you know HTML? Yes. I can compile several webpages with large table la s!

Do you know PHP? Yes. I will write the One-plus-one operation in the function and call it!

Do you know MYSQL? Yes. I will insert and delete my information in the database.

So what do you do next? I think it's okay to test your skills. Let's give you a task and make a message book. It's a comparison with HELLO WORLD! ^ _ ^ Is the first level for beginners.

After a while, you finally learned to insert the form data into the database and then display it. It should be said that the prototype of a program has been born.

However, you may have a look at the east, look at the west, People's Forum, the CMS, and the CRM. When should I write one?

Don't worry. It can be said that your horse is almost tied up, and it's time to start practicing the trend. If you have the conditions, use a pen or print a simple PHP manual on your body, from time to time, you can see it. Remember, you can't let it go without WC.

If you have other requirements, please take a look at this book. "PHP + mysql web development (the third edition)" is called a Bible-level (it may be a good choice (statement: the author did not give me any benefit, I am not a book holder either. I have never even met his old man)

After consolidating your knowledge and familiarizing yourself with the essentials of PHP and MYSQL development, you may doubt that it was actually written by you? Of course, if there is a ghost in the house, it may be written.

At this time, your message book should be added to the registration and paging functions. If you are more powerful, the UI (User Interface) can also be enhanced. After the completion, do you feel a sense of accomplishment? In any case, I wrote a dynamic website program and put it on my own website to play games. Let's look at it with good friends. Hey, look at how good I wrote, and then publicize it on the Internet.

A few days later, you can open the message book again. Why? Wow, more than N pages are displayed! Obviously, your message book has not been well protected. It has been played by JavaScript code. I am very sorry for your feelings at this time, but there is no other way. Continue to work hard!

You have worked hard to get familiar with security issues, and then designed some programs. It feels good.

So next, I will learn it? NO, NO, NO. It's still early. Have you ever touched OOP or something? What about the template?

Well, learn! After learning this, you have learned how to generate static Web pages. Now you should be familiar with XML. Well, XML is also known, so you have to contact AJAX? AJAX is finished... then...

All in all, you will never find that you have learned it all. Some really strong people will always make new things to lose to you. If you don't learn it, you will lag behind. It also confirms the experience of our predecessors. It is really endless learning!

I want to use my YY to get familiar with some learning processes. Maybe my process is the same as some of your ways, but I write so much about it, it just gives you a chance to learn from each other. As for the advantages and disadvantages, you are not afraid to pack tickets.

Never think about quick start. It tells you a way, but it is useless if you lack the effort.

But one thing I can assure you is that if you have learned PHP, you must be able to learn other languages quickly. In turn, if you have learned other languages before, so learning PHP is certainly faster.

But the syntax is easy to learn, but how to use the syntax to achieve everyone has their own way, almost each has its own merits. However, learning from others' successful code is definitely beneficial and harmless. Therefore, it is the best way to look at the classic code that has been refined.

After talking so much about PHP, I just want to say that I should not only master methods, but also work hard. I don't want to see people who give up halfway, believe in themselves, believe in your choice, and trust in your abilities. If you want to give up and be violent, you can leave your mouth open and yell at others. Why can't I do it?

In addition, You must guard against the temptation of ASP/PHP/JSP /. NET comparison may make you feel at a loss. You may have learned half of PHP and started to develop C # ideas, or some people say that JAVA is very strong. At this time, you will never waver, even if you really want to learn, you have to learn PHP. Then I will learn from it again. This is the most difficult thing to think about. If I give up halfway, I can only get nothing, but also waste more time and experience, which is not worth the candle, the most important thing is that you will be looked down upon by others, and no one will like to make friends with people who have different opinions. because such people are too restless and unreliable, you must force yourself to fulfill your goals, even if it is difficult or persistent, so perseverance is exercised.

Finally, I would like to say that many Chinese people are not confident and that when they speak any language in China, the Chinese people do not unite or have no team spirit, on the contrary, I think those people are all blind, sad, and sightly. They always put all their responsibilities away, but do not start from themselves and change this situation with an exemplary attitude, on the contrary, the pessimistic sigh only expects those people to wake up early. Only when everyone works hard can they make progress. However, they feel inferior and will only get worse and worse.

In fact, whether it's PHP or anything else, if we don't learn it, we have to come up with a name. The power of a person may be insignificant, but everyone is working hard and working together, what can't the Chinese do? We must not only catch up with the Chinese standard, but also surpass it. We must make the world use the "China Standard". Maybe I say that some people say that I am crazy, and some people say that I will only shout slogans. This doesn't matter, but what's important is that I finally say what I want in my heart. To put it bluntly, we Chinese people do not lack strength or ambition. Our ambition is not derogatory, it is the ambition of the Chinese to compete for the world's first place. Php has been widely used in China, such as the widely used Discuz forum.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.