Home > Backend Development > PHP Tutorial > A simple PHP framework implementation method_PHP tutorial

A simple PHP framework implementation method_PHP tutorial

WBOY
Release: 2016-07-20 11:17:39
Original
924 people have browsed it

Not original, I have assembled the Apode class + DZ template + encapsulated PDO. You don’t need to look at the application process. It is the same as the ordinary framework syntax. Let’s take a look at the implementation process. It mainly learns how to implement a framework, etc. If you learn to extend or develop on it, it will only take half an hour to learn other frameworks

Several cores

app.php

__autoload (automatic loading class)

base.class.php

Abstract class Base {}//Data abstraction

action.class.php

Abstract class Action extends Base {}//Inherited class

Action (core loading class)

controller.class.php

 getController (Controller and Action accessed by default)

model.class.php

Model (core Model class)

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

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/371951.htmlTechArticleNot original, I have assembled the Apode class + DZ template + encapsulated PDO, so you don’t need to look at the application process, just like the ordinary framework The syntax is the same, let’s take a look at the implementation process, mainly learning how to implement...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template