Re: Magic quotes question
| From: | Ben Edwards | Date: | Tue, 25 Jan 2005 19:13:43 +0000 |
| Subject: | Re: Magic quotes question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207290@lists.php.net to get a copy of this message | ||
OK. This is really confusing me.
I am using the following function to handle this:
function prep( &$text ) {
echo get_magic_quotes_gpc()." ";
if (get_magic_quotes_gpc()) {
echo "mq on for $text";
return $text;
} else {
echo "mq off";
return addslashes($text);
}
}
And it is not doing the assslashes but stuff like \'s is still being
added. wonce savein a few times I get \\\\\'.
Ben
On Tue, 25 Jan 2005 10:39:30 -0800, Chris <listschris@leftbrained.org> wrote:
> It means that you can't set that setting inside a script with ini_set.
>
> Since the earliest opportunity to set it in a script would be after it
> would have already done it's job, it won't work.
>
> You must set it before the script runs.
>
> Chris
>
> Ben Edwards wrote:
>
> >In the php manual it states
> >
> >' Keep in mind that the setting magic_quotes_gpc will not work at runtime.'
> >
> >What douse this actualy mean?
> >
> >Ben
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Ben Edwards - Poole, UK, England
WARNING:This email contained partisan views - dont ever accuse me of
using the veneer of objectivity
If you have a problem emailing me use
http://www.gurtlush.org.uk/profiles.php?uid=4
(email address this email is sent from may be defunct)