PHP 8.6.0 Beta 1 is available for testing

Voting

: six minus four?
(Example: nine)

The Note You're Voting On

randler63 at hotmail dot com
2 months ago
<?php

$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);

if ($_FILES["fileToUpload"]["size"] > 500000) {
    echo "The file is too large.";
}

elseif (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
    echo "The file " . htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.";
} else {
    echo "An error occurred during the upload.";
}

?>

<< Back to user notes page

To Top