SHARE
TWEET

Untitled

a guest Jun 19th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $target_path = 'upload/';
  4. $ex = explode('/', $_FILES['uploadedfile']['name']);
  5. $wat = count($ex) - 1;
  6. $tmp_name = $ex[$wat];
  7. $target_path2 = str_replace('/', '-', $_FILES['uploadedfile']['type']) . '-' . date('z-Y-H-i-s') . '-' . $tmp_name;
  8. $target_path = $target_path . $target_path2;
  9. if ( move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path) ) {
  10.     echo '<a href=' . $target_path . '>LOL GO HERE K</a>';
  11. } else {
  12.     header('Location: index.php');
  13. }
  14.  
  15. ?>
RAW Paste Data
Top