My codes are like this:
The first file take user's file and calls the upload.php
upload.php is like this:
<?php
if (is_uploaded_file($FILES['userfile']['tmp_name'])) {
copy($FILES['userfile']['tmp_name'], "/tmp/".$FILES['userfile']['name']);
} else {
echo "Possible file upload attack. Filename: " . $FILES['userfile']['name'];
}
move_uploaded_file($FILES['userfile']['tmp_name'], "/tmp/".$FILES['userfile']['name']);
?>
The the error information is:
Warning: open_basedir restriction in effect. File is in wrong directory in upload.php on line -- The copy line
Warning: open_basedir restriction in effect. File is in wrong directory in upload.php on line -- The move_uploaded_file line.