For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > January 2006 > Quotes problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Quotes problem
Sunny

2006-01-16, 9:55 pm

Hi

$s = "Guss' tools"

Saved on a linux system by:
file_put_contents("somefile.php",htmlentities($s,ENT_QUOTES,"ISO8859-15"));

and retrieved by:

$g =
html_entity_decode(file_get_contents("somefile.php"),ENT_QUOTES,"ISO8859-15"
);


Why $g = "Guss\' tools" ?

I can't get rid of the escaped single quote.

Thanks


Zilla

2006-01-16, 9:55 pm

Sunny wrote:
[snip]
> Why $g = "Guss' tools" ?
>
> I can't get rid of the escaped single quote.
>
> Thanks


My guess is that the server has magic quotes turned on. take a look here:

http://www.php.net/magic_quotes/

Zilla.
Sunny

2006-01-16, 9:55 pm

Good guess. Stripslashes() did his work.
Thanks


"Zilla" <mail.is.not@an.option> a écrit dans le message de news:
43cbe186$0$15790$14726298@news.sunsite.dk...
> Sunny wrote:
> [snip]
>
> My guess is that the server has magic quotes turned on. take a look here:
>
> http://www.php.net/magic_quotes/
>
> Zilla.



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com