Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <html>
  2. <body>
  3. <form action="welcome.php" method="post" enctype="multipart/form-data">
  4. <input id="foto1slct" name="foto1" size="45" type="file" value="Upload" accept="image/*">
  5. <input id="invia" type="submit" value="Invia">
  6. </input>
  7. </form>
  8. </body>
  9. </html>
  10.  
  11. <html>
  12. <body>
  13.  
  14. <?php $file = 'Italia/categoria.html'; ?>
  15. <?php $current = file_get_contents($file); ?>
  16. <?php $current .= $_POST["foto1"]; ?>
  17. <?php file_put_contents($file, $current); ?>
  18.  
  19.  
  20. </body>
  21. </html>
  22.  
  23. <form enctype="multipart/form-data" method="post" action="welcome.php">
  24. Choose your file here:
  25. <input name="file1" type="file" /><br /><br />
  26. <input type="submit" value="Upload It" />
  27. </form>
  28.  
  29. <?php
  30. $fileName = $_FILES["file1"]["name"];
  31. $fileTmpLoc = $_FILES["file1"]["tmp_name"];
  32. $newfile="tempareryloc/$fileName";
  33. move_uploaded_file($fileTmpLoc,$file);
  34. $file = 'Italia/categoria.html';
  35. $current = file_get_contents($file);
  36. $current. = file_get_contents($newfile);
  37. unlink($newfile);
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement