search
HomeBackend DevelopmentPHP TutorialSome experiences in learning PHP (1)_PHP tutorial

Momo Mo started asking others how to learn PHP. Later, many people came to ask Mo Mo how to learn PHP. No matter Mo Mo is a novice or an experienced player, he always seems to be unable to figure out a clear path. Come on, but now that I have learned PHP silently, 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 everyone chooses a language, it is not based on its background and long history, but more importantly on its practicality. Even a flashy language is The glorious history will eventually decline. Fortunately, PHP has withstood the test, and therefore, it is indeed a language worth learning.

Momo has always grown up listening to the experiences of others. Therefore, based on the experience of his predecessors, Mo Mo has taken many detours and stepped into the right track faster. Here I would like to express my sincere gratitude to those who I will never forget. The seniors who know his name say thank you. In Momo’s eyes, help no matter how big or small, as long as it is help, it will always make Momo’s heart warm. I think the seniors did not help me just to get a thank you from me. , more out of a sense of responsibility and an expectation of silence, so I think that only by learning PHP well can we be worthy of the sweat of our 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 put myself This experience tells everyone who wants to learn PHP well that 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 the formal settlement of a PHP organization directly linked to the official in China. Here’s a belated round of applause!

Okay, let’s get to the point:
Before I talk about my own learning methods, I would like to say something from my heart to those who hope to get useful information from my articles: Silent articles will not be correct. Your study plays a substantial role. Whether you can succeed or not depends on yourself. Perseverance, persistence, and persistence are the only way to success.

Let me 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 create a complete web page by yourself and be familiar with element attributes (2) ) Understand the concept and operating mechanism of dynamic languages, and be familiar with PHP syntax (3) Learn how to combine PHP and HTML to complete simple dynamic pages (4) Get in touch with MYSQL and start designing database programs (5) Continue to consolidate and understand most of PHP Commonly used functions, and can understand OOP, MYSQL optimization, and templates (6) to complete a fully functional dynamic site

My route may coincide with many enthusiasts who learn PHP, which can be regarded as A step-by-step learning process, but novices should not think that learning is quite simple after seeing the summary above. Momo Mo has to pour cold water on you here. Nothing is actually simple, even the sesame cakes in the snack bar are not easy to learn at once. It will be done.

Let me explain my learning ideas first

First of all, after understanding the concept of website, it is not difficult to see that any website is composed of web pages, which means that if you want to complete the website, you must first Learn to make web pages, so you must master HTML to lay the foundation for making websites in the future.

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.

Maybe 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 can 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 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 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, 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.

1

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446743.htmlTechArticleI started asking Mo Mo on how to learn PHP. Later, many people came to ask Mo Mo how to learn PHP. No matter Momo is a novice or an experienced player, it seems that he can’t always find a clear clue...
Statement
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
How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

How does PHP handle object cloning (clone keyword) and the __clone magic method?How does PHP handle object cloning (clone keyword) and the __clone magic method?Apr 17, 2025 am 12:24 AM

In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

PHP vs. Python: Use Cases and ApplicationsPHP vs. Python: Use Cases and ApplicationsApr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Apr 17, 2025 am 12:22 AM

Key players in HTTP cache headers include Cache-Control, ETag, and Last-Modified. 1.Cache-Control is used to control caching policies. Example: Cache-Control:max-age=3600,public. 2. ETag verifies resource changes through unique identifiers, example: ETag: "686897696a7c876b7e". 3.Last-Modified indicates the resource's last modification time, example: Last-Modified:Wed,21Oct201507:28:00GMT.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP: An Introduction to the Server-Side Scripting LanguagePHP: An Introduction to the Server-Side Scripting LanguageApr 16, 2025 am 12:18 AM

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP and the Web: Exploring its Long-Term ImpactPHP and the Web: Exploring its Long-Term ImpactApr 16, 2025 am 12:17 AM

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

Why Use PHP? Advantages and Benefits ExplainedWhy Use PHP? Advantages and Benefits ExplainedApr 16, 2025 am 12:16 AM

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment