Re: Edit a page in PHP
| From: | Jeremy Darling | Date: | Thu, 07 Aug 2003 16:45:40 +0000 |
| Subject: | Re: Edit a page in PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158679@lists.php.net to get a copy of this message | ||
Thanks greatly thats exactly what I was looking for.
"John W. Holmes" <holmes072000@charter.net> wrote in message
news:3F328036.1020808@charter.net...
> Jeremy Darling wrote:
> > 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;
>
> print htmlentities($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).
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals www.phparch.com
>
>
>
>