Re: PHP HTML text editor issues...
| From: | Curt Zirzow | Date: | Wed, 18 Aug 2004 18:32:15 +0000 |
| Subject: | Re: PHP HTML text editor issues... | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194179@lists.php.net to get a copy of this message | ||
* Thus wrote Justin Patrin:
> On Wed, 18 Aug 2004 17:17:26 +0000, Curt Zirzow
> <php-general@zirzow.dyndns.org> wrote:
> > * Thus wrote Tim Traver:
> > >
> > > I just want to get the EXACT text that is in the textarea to be saved to
> > > disk...
> > >
> > > Here is an example of a line that gets clobbered :
> > >
> > > $value =~ tr/\0//d;
> > >
> > > I read the file in from disk using file_get_contents. Does that do any
> > > translation ???
> >
> > file_get_contents doesn't do any filtering. The issue your you're
> > probably running into is that magic_quotes_gpc is set to On. This
> > will addslashes to all your data by default. Two options:
> >
> > 1. Turn it off.
> > 2. apply strip_slashes() to the string before writing to disk
> >
>
> Don't you mean magic_quotes_runtime?
No. gpc is for data that is posted, if magic_quotes_gpc is on
$_POST['textfield'] will have \\0.
when magic_quotes_runtime is on, it effects results from things like
SQL and exec().
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!