Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Get the file name
- $file_name = $_GET['name'];
- // Read file
- $file_read = fopen($file_name,"r");
- // Get the contents
- $contents = fread($file_read, filesize($file_name));
- fclose($file_read);
- ?>
- <html>
- <form action="edit_file.php" method="POST">
- <textarea name="edit" cols="100" rows="20"><?php echo $contents; ?></textarea><p>
- <input type="hidden" name="file_name" value="<?php echo $file_name; ?>">
- <input type="submit" value="Save ME!">
- </form>
- <head>
- <style>
- body {background-color:lightgrey}
- </style>
- </head>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement