All pastes #961114 Raw Edit

Someone

public text v1 · immutable
#961114 ·published 2008-03-28 18:03 UTC
rendered paste body
<form enctype="multipart/form-data" action="uploader.php" method="POST">
    <!-- <input type="hidden" name="MAX_FILE_SIZE" value="100000"> -->
    Choose a file to upload: <input type="file" name="uploadedfile"><br>
    <input type="hidden" name="mumu" value="moo">
    <input type="submit" value="Upload File" name="thebutton">
</form>

<?
error_reporting(E_ALL);

$target_path = "/var/www/uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']) . "+" . date('Ymd.U');

#print_r($_FILES['uploadedfile']);
#echo "<br>\n";
#echo "$target_path<br>\n";
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
}
?>