This commit is contained in:
2020-09-15 19:26:44 +08:00
parent f27cec805d
commit 480abf2d28
2 changed files with 43 additions and 0 deletions
+21
View File
@@ -32,6 +32,27 @@ if (!function_exists('make')) {
}
}
if (!function_exists('loadByDir')) {
/**
* @param $path
*/
function loadByDir($path)
{
$path = rtrim($path, '/');
foreach (glob($path . '/*') as $value) {
if (is_dir($value)) {
loadByDir($value);
}else{
include_once "$value";
}
}
}
}