A simple PHP framework implementation method _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
A simple PHP framework implementation method. Non-original, set the class Apode + DZ Template + package PDO, so you don't have to look at the application process. it is the same as the general framework syntax. let's take a look at the implementation process, I mainly want to learn how to implement a non-original one. I have collected the class Apode + DZ Template + encapsulated PDO, so I don't need to read the application process. it is the same as the general framework syntax, let's take a look at the implementation process. we mainly learn how to implement a framework. it takes only half an hour to learn other frameworks when you learn to expand or develop the framework.

Several cores

App. php

_ Autoload (automatic loading class)

Base. class. php

Abstract class Base {} // data abstraction

Action. class. php

Abstract class Action extends Base {} // inheritance class

Action (core loading class)

Controller. class. php

GetController (default access Controller and Action)

Model. class. php

Model (core Model class)

When writing conditions in the controller, you can use $ sqladd [title] = 'test'; to upload an array to the model.

If you want to extend it, you only need to insert related classes in action. class. php.

Mongodz Template + package PDO, so you don't need to look at the application process. it is the same as the general framework syntax. let's take a look at the implementation process and learn how to implement it...

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.