Forum Moderators: coopster
if (file_exists("/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"/" . $_FILES["file"]["name"]);
echo "Stored in: " . "/" . $_FILES["file"]["name"];
}
}
}
else
{
echo "Invalid file";
}
?>
This code works fine on localhost but not on the server...cud it be a server issue..or is there some other thing that we need to do when uploading on the server?