move uploded file php code example
Example 1: move uploaded file in php
<?php
if (move_uploaded_file($_FILES['userfile']['tmp_name'], "/documents/new/")) {
print "Uploaded successfully!";
} else {
print "Upload failed!";
}
?>
Example 2: php move uploaded file
move_uploaded_file ( string $filename , string $destination ) : bool