Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $path = $_SERVER['DOCUMENT_ROOT'];
- $file = $path . 'test.txt';
- $text = $_POST['text'];
- // save it to a file
- if (file_exists($file))
- chmod($file, 0777);
- $handle = fopen($file, 'w');
- fwrite($handle, $text);
- fclose($handle);
- echo "success";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement