Home > Backend Development > PHP Tutorial > ThinkPHP3.2.3如何定义公共模型?

ThinkPHP3.2.3如何定义公共模型?

WBOY
Release: 2016-06-20 12:30:58
Original
1171 people have browsed it

比如前后台共用的关联模型,该把文件放在哪里?

附上目录结构:


回复讨论(解决方案)

放在Admin 和 Home 同级的 Common/Model 下,没有Model 就自己创建一个

我原来放进去发现公共控制器无法调用,最后发现控制器中用D方法实例化模型时,模型名称必须区分大小写,真的坑爹!

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