Skip to content

Instantly share code, notes, and snippets.

Created August 4, 2013 00:19
What would you like to do?
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