Skip to content

Instantly share code, notes, and snippets.

@davidphasson
Created December 30, 2009 00:59
Show Gist options
  • Save davidphasson/265767 to your computer and use it in GitHub Desktop.
Save davidphasson/265767 to your computer and use it in GitHub Desktop.
<?php
$target = "files/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded ";
$secs = time() - $_SERVER['REQUEST_TIME'];
echo "in a total of $secs seconds.";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment