//自定义函数库 一、
bootstrap下autoload.php 加如下代码:
if(file_exists(__DIR__ . '/../app/Common/functions.php')){ require __DIR__ . '/../app/Common/functions.php';}
二、修改 composer.json 的 autoload 配置项,在 files 中加入要引入的自定义函数文件
"autoload"
: {
...
...
"files"
: [
"app/Helpers/functions.php"
]
},
composer dump-autoload