New PHP users are willing to ask

Source: Internet
Author: User
I am a beginner in PHP! Now I want to make a simple website. I don't want to use any framework (such as zend, & nbsp; yii). now the first question is: how can I load a child page? The second question is: how can I implement MVC structure development? Or should the page and PHP code be basically separated to minimize coupling? ------ Solution ---------------------- First Question: use iframe & nbsp; PHP to consult with new users modestly
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?
------ Solution ----------------------
First problem: use iframe
Second question: the thinkphp framework is generally used.
------ Solution ----------------------
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.

------ Solution ----------------------
1. include in.
2. just use the template engine technology. you can use smarty.
------ Solution ----------------------
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.
------ Solution ----------------------
If you don't want to use any framework, you can implement it yourself. In fact, a framework is built on its own.
------ Solution ----------------------
No framework, so use smarty.

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.