Created
May 28, 2015 23:43
-
-
Save mnsmarcelo/b7fd98a51083e7e25d43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$uploaddir = 'files/'; | |
$uploadfile = $uploaddir . basename($_FILES['arquivo']['name']); | |
echo $uploadfile; | |
echo '<pre>'; | |
if (move_uploaded_file($_FILES['arquivo']['tmp_name'], $uploadfile)) { | |
echo "Arquivo válido e enviado com sucesso.\n"; | |
} else { | |
echo "Possível ataque de upload de arquivo!\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment