Jump to content

Bit confused, how should I update a file?


sesstreets

Recommended Posts

<?php
$file = 'my/path/file';

  if(isset($_POST['submit'])
 {
  $filestring = $_POST['filestring'];
 file_put_contents($file, $filestring);
 }

$filestring = file_get_contents($file);
?>
<form action="" method="post">
<textarea name="filestring">echo $filestring</textarea>
<input type="submit" name="submit" value="Submit">

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.