Archiv verlassen und diese Seite im Standarddesign anzeigen : PHP - prüfen, ob Bild hochgeladen wurde
if (isset($_FILES)) klappt nicht ...
Was kann ich stattdessen machen?
Wird die Datei im gleiches Script hoch geladen?
<?php
$uploadDir = '/var/www/uploads/';
$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 "</pre>";
?>
http://www.netspade.com/articles/php/uploading.xml
Evalley
2005-09-05, 17:48:37
file_exists()
vBulletin®, Copyright ©2000-2025, Jelsoft Enterprises Ltd.