Hi,
please now i'm desperate to get this code runnig after 3 days and 4 sleepless nights....
here is my upload code which i found on phpBuilder itself
<?php
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES. In PHP versions earlier than 4.0.3, use copy() and
// is_uploaded_file() instead of move_uploaded_file.
$uploaddir = '/files/';
$uploadfile = $uploaddir . $FILES['userfile']['name'];
echo $uploadfile;
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>";
?>
now the error that i get when i try to upload files is here
/files/funny.doc
Possible file upload attack! Here's some debugging info:
Array
(
[userfile] => Array
(
[name] => Senerios.doc
[type] => application/msword
[tmp_name] => /tmp/phpEIPCr8
[error] => 0
[size] => 42496
)
)
please suggest what should i do
Thankx
P.S. i'm new to php so if you could explain in detail