Home  >  Article  >  Backend Development  >  Original super simple php framework

Original super simple php framework

WBOY
WBOYOriginal
2016-07-25 09:09:001253browse
The main idea:
PHP is now widely used, and everyone is discussing oop and mvc. I don’t know much about these things, and many places are not comprehensive. I hope everyone can correct me.
This framework is also guided by mvc, uses oop ideas, and adds some static caching methods.
Let’s introduce some main documents:
main.php is the core program, including a simple url routing and a database query data caching function.
model.php model instantiation
view.php A simple template engine
control.php controller navigation



Function description:

1. Currently only supports mysql database.
2. There must be certain rules for controller names. For example, if the file name is xx, then the class name must be xxControl.
3. The model name must have certain rules. For example, if the file name is xx, then the class name must be xxModel.
4. Inheritance cannot be automatically recognized. If there is an inheritance operation, the relevant files need to be included manually.
5. If you are in a linux environment, cache templatecache templateview must have read, write and delete permissions


Statement:
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