Php code can understand but cannot write the solution

Source: Internet
Author: User
Php code can be understood but cannot be written. php code can be understood but cannot be written. why? I learned from w3school and saw a code for uploading files, this code has the function of restricting user uploads in a format not specified. The code is clearly written and easy to understand. When I closed the chrome browser and tried to write it myself, there was a huge difficulty. how can I solve this problem? ask the php predecessors for advice. I really want to learn it well .. Php code is understandable, but cannot be written.
Php code can be understood but cannot be written. why? I learned it in w3school and saw the code for uploading files. this code has the function of restricting users to upload files in unspecified formats. The code is clearly written and easy to understand.
When I closed the chrome browser and tried to write it myself, there was a huge difficulty. how can I solve this problem? ask the php predecessors for advice. I really want to learn it well ..

Share:


------ Solution --------------------
That's why I didn't understand it.

------ Solution --------------------
Reference:
That's why I didn't understand it.

+ 1
Although it is two concepts of understanding with LZ, what #1 says is more important.

My advice is to find a software and draw a diagram of the code flow chart you see (the ability is to draw UML, but it is estimated that you do not understand UML)
This method varies from person to person and is useful to me, because I am used to draft articles when I write articles, even a few hundred words
------ Solution --------------------
Read it again.
------ Solution --------------------
Take the example you mentioned as an example.

When you close your browser and open the editor to prepare for writing code, don't worry about the problem first, and write down your problems one by one.

For example, if/else is okay. Is there any problem in getting and analyzing the code with the suffix? Can it be written?

If not, list them on paper.

The problematic list is the functional point you have not remembered.

Open the browser and read these functions one by one.
------ Solution --------------------
No one can write the code at first glance. you can try writing ideas and write pseudocode first.
------ Solution --------------------
Agree #5 first have ideas and then write code

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.