How to read other people's php source code

Source: Internet
Author: User
If you want to be a good phper, you must learn to read other people's source code. now there are many good php source codes at home and abroad. I used to write articles about the use of domestic php open-source programs, we recommend that you read the discuz Forum, dedecms, and so on. how can this problem be solved?

If you want to be a good phper, you must learn to read other people's source code. now there are many good php source codes at home and abroad. I used to write articles about the use of domestic php open-source programs, we recommend that you read the discuz Forum, dedecms, and so on. how can you read other people's php source code?

1. install the source code first, and familiarize yourself with its functions and application methods by combining its documents and manuals.
2. browse the directory structure of the source code to understand the functions of each directory.

3. after the above two steps, I believe you have a preliminary understanding of this open-source product. now let's analyze its source code. In this step, we start to analyze the source code framework. For example, if the portal is a single portal or multiple portals, you can find the pages used by a function based on the calling rules between pages.
4. familiar with the source code writing style, such as indentation and typographical format.
5. familiarize yourself with the databases and tables used in the source code. refer to the technical support documentation.
6. after the above steps, I believe that you have gained a deeper understanding of the source code.

The following describes how to analyze the php source code:
1. portal construction and implementation of page calling methods. if you see tool classes and tool functions during reading, try to familiarize yourself with them.
2. analyze the tool classes and tool functions used in the source code, so that you can learn a lot of programming skills.
3. combined with some security rules, study how the source code implements the security design.
4. if there is a template engine, study the source code template engine. This article focuses on implementation methods, efficiency, and usability.
5. study various functional modules of the system, so that you can learn programming skills and open your own programming ideas.
6. the design modes used by the research system are similar to those used for implementing the same functions.
7. study source code optimization on access pressure, execution efficiency, system efficiency, and database query.
Now your task is to find a good source code study...

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.