Skip to content

Instantly share code, notes, and snippets.

@anthonycvella
Created August 4, 2013 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonycvella/6148518 to your computer and use it in GitHub Desktop.
Save anthonycvella/6148518 to your computer and use it in GitHub Desktop.
function upload()
{
$signID = isset( $_POST['signID'] ) ? $_POST['signID'] : false ;
$uploaddir = '/uploads/';
$file = basename($_FILES['file']['name']);
$uploadfile = $uploaddir . $file;
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
sendResponse(200, 'Upload Successful');
return true;
}
sendResponse(403, 'Upload Failed');
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment