Habe ein einfaches Upload Script gemacht:
*.html Datei: [Ist nur ein Auszug]
Code: Alles auswählen
<center>
<form method="post" action="action.php" enctype="multipart/form-data">
<input type="hidden" value="104857600" name="MAX_FILE_SIZE" />
<strong>Datei uploaden</strong> (max. 100MB): <input type="file" name="userfile" />
<input type="submit" value="Datei senden" />
</form>
<center>
Code: Alles auswählen
<?php
$uploaddir = './upload/';
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name'])) {
print "Folgender Link führt zur Datei: http://81.89.104.99/upload/".$_FILES['userfile']['name'];
} else {
print "Irgendwas ging schief, hier sind ein paar Zuasatzinformatonen gelistet:\n";
print_r($_FILES);
}
?>
Code: Alles auswählen
Warning: move_uploaded_file(./upload/Konfinunterricht damals.doc) [function.move-uploaded-file]: failed to open stream: Permission denied in /usr/srv/htdocs/default/action.php on line 5
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpKzFe4n' to './upload/Test.doc' in /usr/srv/htdocs/default/action.php on line 5
Irgendwas ging schief, hier sind ein paar Zuasatzinformatonen gelistet:
Array
(
[userfile] => Array
(
[name] => Test.doc
[type] => application/msword
[tmp_name] => /tmp/phpKzFe4n
[error] => 0
[size] => 24576
)
)
Danke für eure Hilfe
Gruß
JENS