Einzelnen Beitrag anzeigen

Benutzerbild von mr47
mr47

Registriert seit: 6. Dez 2004
Ort: Stuttgart
644 Beiträge
 
Delphi 2005 Personal
 
#5

Re: (PHP) Copy() bzw. Move_Uploaded_file() > Wie funktion

  Alt 19. Jul 2005, 20:37
Hi. Ok ich hab den Code folgendermaßen abgeändert:

Code:
<?php
// In PHP kleiner als 4.1.0 sollten Sie $HTTP_POST_FILES anstatt $_FILES verwenden.
// In PHP kleiner als 4.0.3 verwenden Sie copy() und is_uploaded_file() anstatt von
// move_uploaded_file()

$uploaddir = '/tmp/';

print "<pre>";
if (move_uploaded_file("C:\a.txt", $uploaddir . "abc.txt")) { 
   print "File is valid, and was successfully uploaded. 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);


?>
Die Ausgabe im Browser ist

Zitat:
Possible file upload attack! Here's some debugging info:
Array
(
)
und die Datei liegt nicht im Serververzeichnis Sowohl C:\a.txt als auch das Verzeichnis(C:\InetPub\wwwroot)\tmp\ existieren. Was ist falsch ? (Der Pfad in den Klammern kommt von IIS)
mfg mr47
  Mit Zitat antworten Zitat