Registriert seit: 18. Aug 2003
10 Beiträge
Delphi 5 Enterprise
|
Re: Datei Upload über HTTP POST mit Hilfe von Indy funzt net
10. Okt 2003, 18:36
Aus dem PHP Manual
Code:
<?php
// In PHP earlier then 4.1.0, $HTTP_POST_FILES should be used instead of
// $_FILES. In PHP earlier then 4.0.3, use copy() and is_uploaded_file()
// instead of move_uploaded_file
$uploaddir = 'files/';
$uploadfile = $uploaddir. $_FILES['archive']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['archive']['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);
}
?>
KASI
|
|
Zitat
|