tp5框架采用composer 载入文件的方式载入functions.php
目录结构如图:
composer.json中增加代码如下
"autoload":{
"files":["application/common/common/functions.php"]
},
functions.php中有一个test()函数,输入helloworld;
在index控制器的index方法中调用该test()函数,
\test(); 或者test();
都不能正常使用, 我哪里错了?
2.composer files方式载入是不是都需要加\符号了(如何载入不需要加\符号)