1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
<form action="upload.php" method="post"
enctype="multipart/form-data" name="upload">
<input type="file" name="userfile"><input type="submit" name="upload" value="Upload">
</form>
<?php
if($_POST['upload'])
{
// Zielordner
$ordner = "upload";
// Dateiname beibehalten
$dateiname = $_FILES['userfile']['name'];
// Datei in Zielordner verschieben
move_uploaded_file($_FILES['userfile']['tmp_name'], $ordner."/".$dateiname);
}
?>
|