* Thus wrote Justin Patrin:
> On Wed, 18 Aug 2004 17:17:26 +0000, Curt Zirzow
> <[EMAIL PROTECTED]> 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!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to