A simple implementation method of PHP framework

Source: Internet
Author: User
Tags abstract php framework

Not original, set up their own class apode+ dz template + Package PDO, the application process is not to see, and the general framework syntax is the same, look at the implementation of the process, the main learning how to implement a framework, and so you learn to expand or develop on the above, learn the other framework only need half an hour

Several core

app.php

__autoload (Auto Load Class)

base.class.php

Abstract class Base {}//data abstraction

action.class.php

Abstract class Action extends Base {}//inheritance class

Action (Core load Class)

controller.class.php

Getcontroller (Default Access Controller and action)

model.class.php

Model (Core model Class)

When writing a condition in controller, you can use $sqladd [title] = ' test '; pass array to model

If you want to expand it, you just need to insert the relevant class in the action.class.php.

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.