PHP Fehler - Hochladen einer Datei

Ich versuche PHP zu schreiben, um eine Datei in einen Ordner auf meinem Webserver hochzuladen. Folgendes habe ich:

<?php
    if ( !empty($_FILES['file']['tmp_name']) ) {
        move_uploaded_file($_FILES['file']['tmp_name'], './' . $_FILES['file']['name']);
        header('Location: http://www.mywebsite.com/dump/');
        exit;
    }
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
    <head>
        <title>Dump Upload</title>
    </head>
    <body>
        <h1>Upload a File</h1>
        <form action="upload.php" enctype="multipart/form-data" method="post">
            <input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
            Select the File:<br /><input type="file" name="file" /><br />
            <input type="submit" value="Upload" />
        </form>
    </body>
</html>

Ich erhalte folgende Fehlermeldungen:

Warning: move_uploaded_file (./ test.txt) [function.move-uploaded-file]: Öffnen des Streams fehlgeschlagen: Berechtigung in E: \ inetpub \ vhosts \ mywebsite.com \ httpdocs \ dump \ upload.php in Zeile 3 verweigert

Warning: move_uploaded_file () [function.move-uploaded-file]: 'C: \ WINDOWS \ Temp \ phpA30E.tmp' kann nicht nach './test.txt' in E: \ inetpub \ vhosts \ mywebsite.com verschoben werden \ httpdocs \ dump \ upload.php in Zeile 3

Warnung: Header-Informationen können nicht geändert werden - Header, die bereits von (Ausgabe gestartet unter E: \ inetpub \ vhosts \ mywebsite.com \ httpdocs \ dump \ upload.php: 3) in E: \ inetpub \ vhosts \ mywebsite.com \ httpdocs gesendet wurden \ dump \ upload.php in Zeile 4

PHP Version 4.4.7 Ausführen von IIS unter Windows. Diese bestimmte Datei / dieser Ordner hat 777 Berechtigungen.

Irgendwelche Ideen

Antworten auf die Frage(14)

Ihre Antwort auf die Frage