Home > Backend Development > PHP Tutorial > 数据格式的处理你们放在m层还是c层?

数据格式的处理你们放在m层还是c层?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:25:19
Original
1598 people have browsed it

一般大家从数据库拿到数据,要在前台显示,做些格式,内容上的微调和处理的方法
这个方法你们是放在model层还是logic层还是用event来做?
还是直接写在controller层里?

回复内容:

一般大家从数据库拿到数据,要在前台显示,做些格式,内容上的微调和处理的方法
这个方法你们是放在model层还是logic层还是用event来做?
还是直接写在controller层里?

写在Controller层,更确切的说应该是写在View层,Model里不错数据的转换,不然ORM就成空谈了。

Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template