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