初始化

This commit is contained in:
2025-04-18 00:39:21 +08:00
commit 63dbaa16c8
52 changed files with 3448 additions and 0 deletions

17
app/common.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
// 应用公共文件
function store_path(string $disk = 'local')
{
return config('filesystem.disks.'.$disk.'.root');
}
function bytesToSize($a,int $decimals = 2){
$d = [" B", " KB", " MB", " GB", " TB", " PB"];
$e = 1024;
for ($b = 0; $b < count($d); $b++) {
if ($a < $e) {
$ret = $b == 0 ? $a : number_format($a,$decimals);
return $ret . $d[$b];
}
$a /= $e;
}
}