note 47072 deleted from ref.sybase by tularis
| From: | tularis@php.net | Date: | Tue, 02 Nov 2004 08:00:03 +0000 |
| Subject: | note 47072 deleted from ref.sybase by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79482@lists.php.net to get a copy of this message | ||
Note Submitter: emin at at yexmo dot com
----
How can I sense the magic_quotes_sybase value? And how can I change it in my script? I have no idea.
ini_set('magic_quotes_sybase',"1") or ini_get('magic_quotes_sybase')
don't work. ini_set has no effect. ini_get command returns nothing if ini_set didn't run
before.
if magic_quotes_sybase is on it overrides the magic_quotes_gpc and my script fails.
If magic_quotes_sybase is off my code is:
if (get_magic_quotes_gpc()) {
$mx = $m;
} else {
$mx = addslashes($m);
}
If magic_quotes_sybase is ON my code is:
if (get_magic_quotes_gpc()) {
$mx = $m;
$mx = str_replace("\\",chr(92).chr(92), $mx);
$mx = str_replace("''",chr(92)."'", $mx);
} else {
$mx = addslashes($m);
}
But I can not get the state of the magic_quotes_sybase or can not set it by
ini_set('magic_quotes_sybase', "0" )