Home > Backend Development > PHP Tutorial > 关于thinkphp业务层、数据层的问题

关于thinkphp业务层、数据层的问题

WBOY
Release: 2016-06-23 13:14:01
Original
1297 people have browsed it

在几年前用过了Java,发现用着舒服,但速度相比php要慢些,现在学习thinkphp框架,很好的MVC分层处理,但是不知道大家使用thinkphp时,怎么用thinkphp来处理业务和数据库操作的,如果能用例子来说明就更好了,谢谢!


回复讨论(解决方案)

建议你认真阅读一下开发手册

对数据库的操作写在model里,然后在controller里调用所对应的model

对数据库的操作写在model里,然后在controller里调用所对应的model


嗯,它分得不细,把这些都放M层里了
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