Încerc să scriu câteva PHP pentru a încărca un fișier într-un folder de pe serverul meu de web. Iată ce am:
<?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;
}
?>
<html>
<head>
<title>Dump Upload</title>
</head>
<body>
Upload a File
<form action="upload.php" enctype="multipart/form-data" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
Select the File:
<input type="file" name="file" />
<input type="submit" value="Upload" />
</form>
</body>
</html>
Am aceste erori:
Atenție: move_uploaded_file (./ test.txt) [function.move-uploaded-file]: nu a reușit să deschidă fluxul: Permisiunea a fost respinsă în E: \ inetpub \ vhosts \ mywebsite.com \ httpdocs \ dump \ upload.php linia 3
Atenție: move_uploaded_file() [function.move-uploaded-file]: Imposibil de mutat "C: \ WINDOWS \ Temp \ phpA30E.tmp" în "./test.txt" în E: \ inetpub \ vhosts \ mywebsite .com \ httpdocs \ dump \ upload.php pe linia 3
Avertisment: nu se pot modifica informațiile din antet - anteturile deja trimise de către (ieșirea a început la E: \ inetpub \ vhosts \ mywebsite.com \ httpdocs \ dump \ upload.php: 3) în E: \ inetpub \ vhosts \ mywebsite.com \ httpdocs \ dump \ upload.php pe linia 4
Versiunea PHP 4.4.7
Rularea IIS pe o cutie Windows. Acest anumit fișier / dosar are 777 de permisiuni.
Vreo idee?