Thanks much, that made all the difference in the world.
The function would be get_magic_quotes_gpc()

Chris Shiflett wrote:

> Gerard,
>
> The most likely reason is a php.ini configuration called magic_quotes. 
> When enabled, PHP will automatically add slashes to single and double 
> quotes, as well as slashes themselves (to escape them). This is 
> helpful in some environments to help protect against attacks that can 
> be used to execute arbitrary database commands. However, this 
> particular setting is one of the more annoying ones, in my opinion, 
> because it makes it more difficult to write portable code.
>
> Hopefully this answers your question, and you can just check your 
> php.ini. If you need to dynamically check the configuration, there is 
> a function that will give you the setting of magic_quote. A quick 
> reference in the manual will give it to you.
>
> Oh, also, you cannot disable this per script, because the slashes are 
> added perior to the data being given to PHP, hence prior to your 
> script's execution.
>
> Happy hacking.
>
> Chris
>
> Gerard Samuel wrote:
>
>> A few months ago, I wrote a bit of code to stripslash() 
>> "PATH_TRANSLATED" on a w2k box, because,
>> php was reporting it with double slashes like C:\\winnt\\some_dir
>>
>> Today I noticed that the code is broken because PATH_TRANSLATED is 
>> now reported with one slash like C:\winnt\some_dir
>> Does anyone know when paths contain double slashes on a w2k box, so 
>> that I can anticipate for them??
>>
>> Thanks for any insight you may provide.
>
>
>
>
>
>

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/




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

Reply via email to