Sandro Feuillet
Legendäres Mitglied
Hi zusammen
Mit folgendem code versuche ich ein File auf einen IIS 5 Server hochzuladen.
Klappt leider nicht, hat jemand eine Ahnung an was das liegt?
CODE
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php if ($submit) {
$uploadDir = "H:\\Data\\mccq\\upload\\";
$uploadFile = $uploadDir . $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
print "File is valid, and was successfully uploaded. ";
print "Here's some more debugging info:\n";
print_r($_FILES);
}
else
{
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
print_r($uploadDir);
}
print "</pre>";
}else{
?>
<form enctype="multipart/form-data" action="upload.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="userfile" type="file" />
<input type="submit" value="submit" name="submit" />
</form>
</body>
</html>
¨
Der Output ist
CODE
Possible file upload attack! Here's some debugging info:
H:\Data\mccq\upload\
also wird irgendwie nichtmal ein Wert für "$_FILES" ausgegeben.
Das script habe ich von hier. Ich habe es einfach für den Windows Pfad angepasst.
Mit folgendem code versuche ich ein File auf einen IIS 5 Server hochzuladen.
Klappt leider nicht, hat jemand eine Ahnung an was das liegt?
CODE
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php if ($submit) {
$uploadDir = "H:\\Data\\mccq\\upload\\";
$uploadFile = $uploadDir . $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
print "File is valid, and was successfully uploaded. ";
print "Here's some more debugging info:\n";
print_r($_FILES);
}
else
{
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
print_r($uploadDir);
}
print "</pre>";
}else{
?>
<form enctype="multipart/form-data" action="upload.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="userfile" type="file" />
<input type="submit" value="submit" name="submit" />
</form>
</body>
</html>
¨
Der Output ist
CODE
Possible file upload attack! Here's some debugging info:
H:\Data\mccq\upload\
also wird irgendwie nichtmal ein Wert für "$_FILES" ausgegeben.
Das script habe ich von hier. Ich habe es einfach für den Windows Pfad angepasst.