<h1>Upload</h1>

<form
action="<?php echo $PHP_SELF ?>"
method="post"
enctype="multipart/form-data">
<input type="file" name="probe" />
<input type="submit" value="Go!" />
</form>
<hr />

<?php
	if(isset($_FILES['probe']) and ! $_FILES['probe']['error'])
	  {

	move_uploaded_file($_FILES['probe']['tmp_name'], "./tmp/newfile.txt");

	printf("Sie ist %u Bytes groß und vom Typ %s.<br />\n",
	$_FILES['probe']['size'], $_FILES['probe']['type']);

	?>
	<textarea cols="50" rows="50"><?include('./tmp/newfile.txt')?></textarea>
<? }
?>