Posted by bill on 11/25/06 00:59
I can validate that the file uploaded because is_uploaded_file()
returns true.
---------
if (is_uploaded_file($_FILES['test-img']['tmp_name'])) {
echo "File ". $_FILES['test-img']['name'] ." uploaded
successfully.<br />";
}
------------------------
When I try to move the file using move_uploaded_file it fails.
--------------
if (move_uploaded_file($_FILES['test-img']['tmp_name'],
$_SERVER['DOCUMENT_ROOT']. "/members/images/test-file.gif" )) {
echo "File is valid, and was successfully uploaded.<br />";
} else {
echo "File move failed!<br />";
}
--------------------------
I have checked the existence and permissions on
$_SERVER['DOCUMENT_ROOT']. "/members/images/"
and it appears ok.
What I need is some suggestions on how to debug this.
move_uploaded_file just returns a boolean, no idea of why it fails.
thanks
bill
Navigation:
[Reply to this message]
|