Home > Backend Development > PHP Tutorial > thinkphp3.2.2版本,公共函数放哪里才略自动加载

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

WBOY
Release: 2016-06-13 11:57:34
Original
880 people have browsed it

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

现在报错不能使用,

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

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template