folder management

This commit is contained in:
ryan
2025-03-03 01:13:52 -05:00
parent 7c689f4b75
commit 1a1ae98232
14 changed files with 940 additions and 228 deletions

18
getFolderList.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
require 'config.php';
header('Content-Type: application/json');
$folderList = [];
$dir = rtrim(UPLOAD_DIR, '/\\');
if (is_dir($dir)) {
foreach (scandir($dir) as $item) {
if ($item === '.' || $item === '..') continue;
$path = $dir . DIRECTORY_SEPARATOR . $item;
if (is_dir($path)) {
$folderList[] = $item;
}
}
}
echo json_encode($folderList);
?>