Ich glaub es liegt ean einem simlen Tippfehler meinerseits ; ;
Ach ja, die $_FILES Variablen sind automatisch gegeben, wenn was hochlädst, du musst sie also nicht selbst erstellen.
Code:
<p>
<?
//$_FILES['file']['name']; // Name der Datei auf deinem PC
//$_FILES['file']['type']; // MIME Typ z.B. text/plain
//$_FILES['file']['size']; // Dateigröße in Byte
//$_FILES['file']['tmp_name']; // Name der hochgeladenen Datei im temporären Verzeichnis
//$_FILES['file']['error']; // Eventuelle Fehlermeldung
$status = $_GET['upload'];
if ($status=='1')
{
$form_password = $_POST['password'];
include("config.php");
if ($form_password == $password)
{
move_uploaded_file($_FILES['file']['tmp_name'], '/www/www/virtual/armitage2k.net/htdocs/public/scripts/upload/up/' . $_FILES['file']['name']);
echo "<center><div class='norm'><b>$file_name was successfully uploaded.</b></div></center>";
}
else
{
echo "<center><div class='norm'><b>The upload password was not correct, please go back and re-enter the password correctly.</b></div></center>";
}
}
else
{
?>
<table>
<form action="<? $self_file = $_SERVER['PHP_SELF']; echo "$self_file"; ?>?upload=1" enctype="multipart/form-data" method="post">
<tr>
<td style="padding:2px">Passwort:</td>
<td style="padding:2px"><input name="password" type="password" cols="30"></td>
</tr>
<tr>
<td style="padding:2px">Datei:</td>
<td style="padding:2px"><input name="file" type="file" class="textarea"></td>
</tr>
<tr>
<td align="center"><input name="Submit" type="submit" value="Upload" ></td>
</tr>
</form>
<?
}
?>
</table>
</p>
Der Tippfehler war, dass ich bei move_uploaded_file() die Angabe vom Manual übernommen hatte, ohne sie anzupassen.