Guest User

Untitled

a guest
Dec 11th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <?php
  2. $target_path = "/".category."/";
  3.  
  4. $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
  5.  
  6. if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
  7. echo "The file ". basename( $_FILES['uploadedfile']['name']).
  8. " has been uploaded";
  9. } else{
  10. echo "There was an error uploading the file, please try again!";
  11. }
  12. ?>
Add Comment
Please, Sign In to add comment