Maybe the enc type attribute is missing in the form tag,
and we must use post method.
<form action="file_upload.php" enctype="multipart/form-data" method="post">
if (copy($file, "path/to/".$file_name."")) {
echo "File uploaded";
}
else {
echo "Something went wrong";
}
Thomas A