Home  >  Article  >  Backend Development  >  thinkphp跨模块访问公共函数

thinkphp跨模块访问公共函数

WBOY
WBOYOriginal
2016-06-06 20:32:031100browse

thinkphp跨模块访问公共函数
这个是我的目录树,我想在模块Admin中的Controller中的一个action中调用另一个模块User中的公共方法common.php中的一个函数,请问应该怎么写?

回复内容:

thinkphp跨模块访问公共函数
这个是我的目录树,我想在模块Admin中的Controller中的一个action中调用另一个模块User中的公共方法common.php中的一个函数,请问应该怎么写?

只能这样咯。

<code>include APP_PATH. 'User/Common/common.php';
</code>
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