> -----Original Message----- > From: MikeP [mailto:mpeloso@xxxxxxxxxxxxx] > Sent: Thursday, December 18, 2008 7:33 AM > To: php-general@xxxxxxxxxxxxx > Subject: Re: fread question > > Still having problems: > magic_quotes_runtime is off > BUT > magic_quotes_gpc is on > I cant change them myself so I tried > stripslashes > That doesnt work though: > > $_POST[$fname] = fread($fileHandle, $_POST[$fname.'_size']); > $test=$_POST[$fname]; > $test3=stripslashes($test); > > $test3 and $test are the same. > > Any other Ideas? > > "Robert Cummings" <robert@xxxxxxxxxxxxx> wrote in message > news:1229567238.8302.35.camel@xxxxxxxxxxxx > > On Wed, 2008-12-17 at 19:54 -0500, MikeP wrote: > >> Hello, > >> I have been trying to use fread to open a file, but it always > escapes > >> special characters. > >> How do I open afile without it modifying my original file: > >> > >> $_POST[$fname] = fread($fileHandle, $_POST[$fname.'_size']); > >> I use this and get slashes everywhere.This kills my REGex that gets > coded > >> next. > > > > Check this magically shitty setting in your php.ini: > > > > magic_quotes_runtime > > > > It should be off unless someone with less brains than a turd got a > hold > > of your ini file. The PHP site's page on ini_set() [1] talks a bit about how to set that particular option in an .htaccess file: set PHP_INI_PERDIR settings in a .htaccess file with 'php_flag' like this: php_flag register_globals off php_flag magic_quotes_gpc on If you can get at your .htaccess, maybe you could do it that way (since I don't believe you can change magic_quotes_gpc using ini_set() or similar methods). HTH, // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php