Skip to content

Instantly share code, notes, and snippets.

@Broich
Created April 2, 2014 14:53
Show Gist options
  • Save Broich/9935819 to your computer and use it in GitHub Desktop.
Save Broich/9935819 to your computer and use it in GitHub Desktop.
<?php
$uploaddir = 'images/';
$file = basename($_FILES['file']['name']);
$uploadfile = $uploaddir . $file;
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
echo "OK";
} else {
echo "ERROR";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment