-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.php
More file actions
33 lines (28 loc) · 904 Bytes
/
Copy pathbase.php
File metadata and controls
33 lines (28 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
function load_files($directory){
if(is_dir($directory)) {
$dir = opendir($directory);
$sub_file = [];
while (($file = readdir($dir)) !== false) {
if ($file == "." || $file == "..") continue;
if (is_dir($directory . DIRECTORY_SEPARATOR . $file)) {
$sub_file[] = load_files($directory . DIRECTORY_SEPARATOR . $file);
} else {
require_once($directory . DIRECTORY_SEPARATOR . $file);
$sub_file[] = $directory . DIRECTORY_SEPARATOR . $file;
}
}
closedir($dir);
return $sub_file;
}
return [];
}
function dd(){
array_map("var_dump", func_get_args());
exit;
}
define("ROOT", __DIR__);
define("LIBRARY", ROOT. DIRECTORY_SEPARATOR. "libraries");
load_files(LIBRARY);
require_once("vendor/autoload.php");
require_once("secret_config.php");