Guest User

Untitled

a guest
May 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <html>
  2. <body>
  3. <?php
  4.  
  5. if (isset($_REQUEST['filepath']))
  6. {
  7. $filepath = $_REQUEST['filepath'];
  8. $filecats = "$filepath s";
  9. $filecontent = $_REQUEST['filecontent'] ;
  10.  
  11. $file = fopen("../$filepath.php","x");
  12. echo fwrite($file,"<?php include(header.php); include($filecats.php); include(footer.php);");
  13. fclose($file);
  14.  
  15. $files = fopen("../$filecats.php","x");
  16. echo fwrite($file,$filecontent);
  17. fclose($files);
  18. }
  19. else
  20. {
  21. echo "<form method='post' action='addfile.php'>
  22. Filepath: ../<input name='filepath' type='text' />.php<br />
  23. Fillinnehåll:<br />
  24. <textarea id='filecontent' rows='40' cols='100'>
  25. </textarea><br />
  26. <input type='submit' />
  27. </form>";
  28. }
  29. ?>
  30. </body>
  31. </html>
Add Comment
Please, Sign In to add comment