Paul's Programming Notes     Archive     Feed     Github

move_uploaded_file To Current Path - PHP

$uploadfile = './' . basename($_FILES['file']['name']);

if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
echo "File was successfully uploaded.\n";
} else {
echo "There was an issue uploading the file.\n";
}