View Single Post
Old 11-06-2004, 09:31 PM  
Chris
Too lazy to set a custom title
 
Chris's Avatar
 
Industry Role:
Join Date: May 2003
Location: icq: 71462500 Skype: Jupzchris
Posts: 27,880
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.

$uploaddir = './DIR YOU WANT PICS IN/';
$uploadfile = $uploaddir . $_FILES['uploadfile']['name'];

print "<pre>";
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $uploadfile)) {

echo "<B>".$_FILES['uploadfile']['name']."<BR></B>";
print "File is valid, and was successfully uploaded. ";
} else {
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
}
print "<REMOVETHISSPACE /pre>";
__________________
[email protected]
Chris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote