Is it possible to have a PHP page that takes the contents of a specified text document and allows you to edit that document online without having to go in through FTP? If it is, thats brilliant! Let me know, Thanks in advance
<?php // Name of the text file - must be chmoded to 777. $file = "text.txt"; @touch($file); if (!is_readable($file) || !is_writable($file)) { die("Chmod $file to 777."); } // Save text file contents if given if (isset($_POST["textarea"]) && $textarea = $_POST["textarea"]) { if (get_magic_quotes_gpc()) { $textarea = stripslashes($textarea); } $fp = fopen($file, "w"); fwrite($fp, $textarea); fclose($fp); } // Load text file contents $contents = file_get_contents($file); ?> <form action="editor.php" method="POST"> <div align="center"> <textarea name="textarea" cols="60" rows="10"><?php echo $contents ?></textarea><br /> <input type="submit" value="Save File" /> </div> </form> PHP: