Skip to content

Instantly share code, notes, and snippets.

@blue0513
Created January 16, 2018 05:23
Show Gist options
  • Save blue0513/7f772c0ad1e78903a3839e78bffbba0a to your computer and use it in GitHub Desktop.
Save blue0513/7f772c0ad1e78903a3839e78bffbba0a to your computer and use it in GitHub Desktop.
upload data from unity to server
<?php
if(isset($_FILES['theFile'])) {
$uploaddir = "YOUR DATA PATH";
$uploadfile = $uploaddir . basename($_FILES['theFile']['name']);
if(move_uploaded_file($_FILES['theFile']['tmp_name'], $uploadfile)){;
echo "success";
}
} else {
echo "fail";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment