PHP Novice Humbly Consult

Source: Internet
Author: User
I am a novice php!
Now I want to make a simple website.
Do not want to use any framework (e.g. Zend, yii)
Now the first question is: How do I implement a parent page that can load a child page?
The second question is: How do I implement MVC structure development? or let the page and PHP code basically separated, as low as possible coupling?


Reply to discussion (solution)

I am a novice php!
Now I want to make a simple website.
Do not want to use any framework (e.g. Zend, yii)
Now the first question is: How do I implement a parent page that can load a child page?
The second question is: How do I implement MVC structure development? or let the page and PHP code basically separated, as low as possible coupling?

First question: Using an IFRAME
The second problem: using frames, which are generally used thinkphp frames

1. Require and include introduction files
2, the Unified import file, introduced (require) PHP Logic processing page (c), the C layer introduced the table model (M), and finally introduced the View page (v), V layer is only used to show the C-layer obtained variables

1, include in Can
2, using the template engine technology is, you can use Smarty.

The first question is answered upstairs.
The second question if you do not want to use any framework, you can write your own PHP class, such as database connection class, registration class, Operation class, etc., the novice to write their own class can have a great increase in your level

Don't want to use any frame, can you? a????。 It is self-framework.

No frame, then use Smarty.

Everyone's reply is very helpful, thank you all

  • 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.