Skip to content

Instantly share code, notes, and snippets.

@pokemaobr
Created May 27, 2016 19:52
Show Gist options
  • Save pokemaobr/c2a2c78b25b9fe130c47e4f620227b89 to your computer and use it in GitHub Desktop.
Save pokemaobr/c2a2c78b25b9fe130c47e4f620227b89 to your computer and use it in GitHub Desktop.
<?php
echo $_FILES['arquivo']['name'];
if(isset($_FILES['arquivo'])){
$diretorio = "dist/";
$novo_ = $_FILES['arquivo']['name'];
move_uploaded_file($_FILES['arquivo']['tmp_name'], $diretorio.$novo_);
}
?>
<h1>Upload de Arquivos</h1>
<form action="upload.php" method="POST" enctype="multipart/form-data">
Arquivo: <input type="file" required name="arquivo">
<input type="submit" value="salvar">
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment