Heim  >  Artikel  >  Backend-Entwicklung  >  thinkphp3.2.2版本,公共函数放哪里才略自动加载

thinkphp3.2.2版本,公共函数放哪里才略自动加载

WBOY
WBOYOriginal
2016-06-13 11:57:34820Durchsuche

thinkphp3.2.2版本,公共函数放哪里才能自动加载?
在原来的项目里面有个common/common.php,
里面放的就是些function,之前能在任何地方直接使用,

现在报错不能使用,

公用函数库文件放置在Application应用模块根目录下的Common模块下的Common目录下即可(./Application/Common/Common/function.php),其他模块直接调用该公用函数文件的函数,命名空间都不需要

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