Edit a page in PHP
| From: | Jeremy Darling | Date: | Thu, 07 Aug 2003 16:35:14 +0000 |
| Subject: | Edit a page in PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158676@lists.php.net to get a copy of this message | ||
This is driving me nuts. I know it can be done, cuz I've seen it done
before, but I can't figure it out.
I would like to have a php file that allows me to edit an HTML/PHP file thru
my browser.
Currently I have something that looks like:
<TextArea>
<?PHP
$filename = "/usr/local/something.txt";
$handle = fopen ($filename, "r");
$contents = fread ($handle, filesize ($filename));
fclose ($handle);
print $contents;
?>
</TextArea>
This works fine unless the page that I'm editing has a TextArea tag in it,
witch throws everything off. I know that this is more of an HTML question,
but I couldn't find the answer in my quick searches (too many pages to go
thru).
Anyone have an idea on how to do this, or a pointer on what to put into
GOOGLE to get back what I'm looking for.
Thanks,
Jeremy