diff options
Diffstat (limited to 'upload-org.php')
-rw-r--r-- | upload-org.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/upload-org.php b/upload-org.php new file mode 100644 index 0000000..40f403f --- /dev/null +++ b/upload-org.php @@ -0,0 +1,18 @@ +<?php +$dir = '/home/luke/j1-uploads/'; + +$set = isset($_POST['org_data']) && isset($_POST['filename']); +if ($set) { + $filename = $dir.'/'.rawurlencode($_POST['filename']).'.org'; + $fd = fopen($filename, 'w'); + fwrite($fd, $_POST['word_data']); + fclose($fd); + echo 'uploaded'; +} else { + ?> + <form method="post" action="upload-msword.php"> + <input type="text" name="filename" /> + <textarea name="org_data"></textarea> + </form> + <?php +} |