You can use DevEdit to load a HTML file, edit it and then save it again quite easily.
Here's
some PHP code that will load a file called content.html and show its
HTML in the DevEdit control. You can then change the content and it
will be saved back to the content.html file:
<?php
include("de/class.devedit.php");
$myDE = new DevEdit;
$myDE->SetName("myDevEditControl");
SetDevEditPath("/de");
$myDE->SetDocumentType(de_DOC_TYPE_HTML_PAGE);
if(@$_POST["save"] == "true")
{
$fileContent = $myDE->GetValue(false);
$fp = fopen("content.html", "w");
fputs($fp, $fileContent);
fclose($fp);
echo "Content.php saved!<br><br><a href='test.php'>Continue</a>";
}
else
{
$fp = fopen("content.html", "rb");
while(!feof($fp))
{
$data .= fgets($fp, 1024);
}
$myDE->SetValue($data);
?>
<form action="test.php" method="post">
<input type="hidden" name="save" value="true">
<?php $myDE->ShowControl(400, 300, "my_image_dir"); ?>
<input type="submit" value="Save">
</form>
<?php
}
?>
Note: This is an example. You may have to change parts of the code above to get it to work.
