How should the arguments be structured when using the move_uploaded_file() function in PHP?

When using the move_uploaded_file() function in PHP to move an uploaded file to a new location, the function requires two arguments: the temporary file path of the uploaded file and the destination file path where the file should be moved. It is important to ensure that the destination directory is writeable by the PHP process. The function returns true if the file is successfully moved, and false if there is an error.

$uploaded_file = $_FILES['file']['tmp_name'];
$destination_file = 'uploads/' . $_FILES['file']['name'];

if (move_uploaded_file($uploaded_file, $destination_file)) {
    echo 'File uploaded successfully.';
} else {
    echo 'Error uploading file.';
}