I am a beginner in PHP!
Now I want to make a simple website.
I don't want to use any frameworks (such as zend and yii)
Now the first question is: how can a parent page be loaded into a subpage?
The second question is: how can I implement MVC structure development? Or should the page and PHP code be basically separated to minimize coupling?
Reply to discussion (solution)
I am a beginner in PHP!
Now I want to make a simple website.
I don't want to use any frameworks (such as zend and yii)
Now the first question is: how can a parent page be loaded into a subpage?
The second question is: how can I implement MVC structure development? Or should the page and PHP code be basically separated to minimize coupling?
First problem: use iframe
Second question: the thinkphp framework is generally used.
1. import files using require and include
2. uniform Portal file, introduction of (require) php logic processing page (C), introduction of table model (M) in layer C, and finally introduction of View Page (V ), the V layer is only used to display the variables obtained by The C layer.
1. include in.
2. just use the template engine technology. you can use smarty.
The first question has been answered upstairs.
Second, if you don't want to use any framework, you can write php classes by yourself, such as database connection, registration, and Operation classes. writing classes by yourself can greatly improve your level.
I don't want to use any framework. can I? 1 ????. Which? Is it yourself? I? Framework.
No framework, so use smarty.
Your reply is very helpful. thank you!