Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Short answer: Yes, but from your post I don't think you'd find it easy.</p> <p>In some more depth, you'll need to use a server-side language such as PHP for this.</p> <p>I won't go into how to get set up with PHP, we'll assume you know that, and if you don't then you have a great excuse to go Googling :) However, here's a simple working example script for you.</p> <p>WARNING: There are a lot of pitfalls with allowing people to write to files on your server. You CERTAINLY don't want to make something like this accessible to anyone except HIGHLY trusted people. I can't over-emphasise how careful you should be with something like this unless you understand the implications of it.</p> <pre><code>&lt;?php // Change this to the file you want to be editing // This path is relative to this script // So if this script is in /somewhere/something/scripts/save.php // And your file is at /somewhere/something/files/hello.txt // This should read: $fname = "../files/hello.txt"; $fname = "something.txt"; // Now don't touch anything else :) // This checks if we've submitted the file if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Get the posted content $content = $_POST['content']; // Open the file, or exit with an error message if we can't if (!$handle = fopen($fname, 'w')) { echo "Cannot open file ($filename)"; exit; } // Write the new content into the file fwrite($fhandle, $content); fclose($fhandle); } // Get the contents of the file $content = file_get_contents($fname); ?&gt; &lt;form action="" method="post"&gt; &lt;p&gt;Editing &lt;?php echo $fname; ?&gt;&lt;/p&gt; &lt;textarea name="content"&gt;&lt;?php echo $content; ?&gt;&lt;/textarea&gt; &lt;input type="submit" value="Save" /&gt; &lt;/form&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload