Skip to content

Instantly share code, notes, and snippets.

@andrerocker
Created November 7, 2010 18:24
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 andrerocker/666302 to your computer and use it in GitHub Desktop.
Save andrerocker/666302 to your computer and use it in GitHub Desktop.
post blog upload frag
<?
function processaUploadLogo($arquivo)
{
$dir = "destino/";
$ale = rand(00,9999);
if (isset($arquivo))
{
$nome = $ale.basename($arquivo["name"]);
if (!move_uploaded_file($arquivo["tmp_name"], $dir.$nome))
return false;
return $nome;
}
return false;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment