Re: Looking for comments whether this is a bug or not

From: Date: Sun, 31 Aug 2003 15:11:49 +0000
Subject: Re: Looking for comments whether this is a bug or not
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-4320@lists.php.net to get a copy of this message
* Thus wrote Jeremy Johnstone (jsjohnst@altdns.net): > > $email->body = "This is a test email. Testing c:\test\foo.exe"; > > When the $email object is later broke down and stored in the database > addslashes is done (as it should be) before the variable is stored. > > If you check the database though, no slashes were added to the string. addslashes() is working properly. What you're experiencing is the database servers' translation of '\\' -> '\'. The documentation on addslashes explains this: http://php.net/addslashes > I am doing something wrong (or did I misunderstand something) or is this > in fact a bug? I have tested it on PHP 4.2, 4.3.2, and 4.3.3 and the btw, you should post these questions to the php-general list, especially when you are in doubt if you're using the function properly. Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.internals (#4320) next »