Re: Escaping Escape Characters
| From: | jeremy brand | Date: | Fri, 18 Aug 2000 10:19:07 +0000 |
| Subject: | Re: Escaping Escape Characters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12454@lists.php.net to get a copy of this message | ||
On Fri, 18 Aug 2000, Ben Ocean wrote:
> Hi;
> I have a script that, on another (presumably older) version of PHP3
> required that I escape the single quote character. I've transferred the
> account to my own server and now I have all sorts of nasty single quotes
> appearing with the escape character in front of them, like this:
> She\'s
> Denmark\'s
> etc. Is there an easy way of correcting this?
> TIA,
> BenO
The easy way is to make sure your new php.ini (php4) files has the
same setting as your old php3.ini (php3).
You need to look for this:
magic_quotes_gpc = Off ;;; COMMENT;;; or On
Otherwise, if you don't have access to your php.ini files, the you can
rely on a combination of:
http://www.php.net/manual/function.set-magic-quotes-runtime.php
------------------------
and
http://www.php.net/manual/function.get-magic-quotes-runtime.php
------------------------
and
http://www.php.net/manual/function.get-magic-quotes-gpc.php
--------------------
Hope this helps,
:)
-jeremy brand
_______________________________________________________________________
GnuPG Fingerprint: 9F5E 95E0 1CC2 E054 84EA 6099 8ACD 9DBA D2C0 5EA9
_ http://www.jeremybrand.com/jeremy/brand/jeremy_brand.html
for more __