Created
July 16, 2012 16:44
-
-
Save kevinholler/3123707 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 | |
$target = sys_get_temp_dir(); | |
$target = $target . "../" . basename( $_FILES['uploaded']['name']) ; | |
$ok=1; | |
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) | |
{ | |
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; | |
} | |
else { | |
echo "Sorry, there was a problem uploading your file."; | |
} | |
?> | |
<form enctype="multipart/form-data" action="index.php" method="POST"> | |
Please choose a file: <input name="uploaded" type="file" /><br /> | |
<input type="submit" value="Upload" /> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment