Skip to content

Instantly share code, notes, and snippets.

@anvarazizov
Created September 5, 2014 10:34
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 anvarazizov/625812f22cc71b79672f to your computer and use it in GitHub Desktop.
Save anvarazizov/625812f22cc71b79672f to your computer and use it in GitHub Desktop.
upload.php
<?php
$uploaddir = './uploads/';
$file = basename($_FILES['userfile']['name']);
$uploadfile = $uploaddir . $file;
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "http://iphone.zcentric.com/uploads/{$file}";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment