合并devlop
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* Here is your custom functions.
|
||||
*/
|
||||
|
||||
use support\exception\BusinessException;
|
||||
|
||||
/**
|
||||
* 标准化账号参数
|
||||
*
|
||||
@@ -39,4 +41,24 @@ function htmlpage()
|
||||
$html = file_get_contents(public_path('mzl.html'));
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配置
|
||||
*/
|
||||
function getConfig($filePath = null)
|
||||
{
|
||||
// 构建文件路径
|
||||
$config_file = app_path($filePath);
|
||||
// 检查文件是否存在
|
||||
if (!file_exists($config_file)) {
|
||||
return [];
|
||||
}
|
||||
// 包含文件并获取返回的数组
|
||||
$config = include $config_file;
|
||||
// 验证是否为数组
|
||||
if (!is_array($config)) {
|
||||
return [];
|
||||
}
|
||||
return $config;
|
||||
}
|
||||
Reference in New Issue
Block a user