Existing file editors in PHP?
<p>Is there any existing php code that will allow me to edit and save files from the browser? </p>

<p>Ex: a text area on the page site.com/edit.php would save to a specified file? I want to be able to edit files on the fly. </p>

<p>I am hosting the site on XAMPP and cant seem to get FTP working so this would be a big use if I need to edit a file and cant get access to the hosting computer. </p>

<p>This is the closest I have found to what I need, however cant seem to get it to work (the goal is to change 'change.php'):</p>

<pre><code>&lt;?php
  if ($changefile) {
     $slash = stripslashes($_POST['filetest']);
     $filetochange = "change.php";
     $filetochangeOpen = fopen($filetochange,"w") or die ("Error editing.");
     fputs($filetochangeOpen,$slash);
     fclose($filetochangeOpen) or die ("Error Closing File!");
     }
?&gt;
&lt;form method=post action=""&gt;

&lt;textarea rows="40" cols="60" name="filetest"&gt;
&lt;?
// Implode CSS
$filetochange = "change.php";
print (implode("",file($filetochange)));
?&gt;
&lt;/textarea&gt;&lt;br /&gt;

&lt;br /&gt;
&lt;input type="submit" value="Change File" name="changefile"&gt;
&lt;/form&gt;
</code></pre>
