Heim  >  Artikel  >  Backend-Entwicklung  >  thinkphp跨模块访问公共函数

thinkphp跨模块访问公共函数

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

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

回复内容:

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

只能这样咯。

<code>include APP_PATH. 'User/Common/common.php';
</code>
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn