Created
September 14, 2011 17:48
-
-
Save mokkun/1217231 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_path = "images/"; | |
$target_path = $target_path . basename($_FILES['file']['name']); | |
if (move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) { | |
echo "The file ". basename( $_FILES['file']['name']) . " has been uploaded"; | |
} else { | |
echo "There was an error uploading the file, please try again!"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment