Created
August 4, 2013 00:19
-
-
Save anthonycvella/6148518 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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