note 7837 added to AddSlashes
| From: | jlp at php2 dot chek dot com | Date: | Wed, 16 Aug 2000 21:54:36 +0000 |
| Subject: | note 7837 added to AddSlashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-1985@lists.php.net to get a copy of this message | ||
note that the escaping style used by addslashes depends on the configuration variable
magic_quotes_sybase-- even if magic_quotes_gpc and magic_quotes_runtime are disabled.
eg:
$string="foo\\bar'baz\"quux";
ini_alter("magic_quotes_sybase",0);
$string1=addslashes($string);
ini_alter("magic_quotes_sybase",1);
$string2=addslashes($string);
print("string1: $string1<br>");
print("string2: $string2<br>");
outputs:
string1: foo\\bar\'baz\"quux
string2: foo\bar''baz"quux
http://www.php.net/manual/function.addslashes.php