|
Posted by Chris Shiflett on 10/12/05 17:18
Martin Selway wrote:
> A servername may contain a backslash e.g. Server1\SQL1.
> When this data is returned from the URL e.g. $server =
> $_GET['server']; The name is returned as Server1\\SQL1,
> so the search fails.
Sounds like magic_quotes_gpc is enabled. Disable it.
> I've tried using a regular expression to remove one of
> the backslashes:
> $server = ereg_replace("\\", "\", $server);
There is a function called stripslashes() that does this. Also, you
should not use a regular expression function when matching literal
strings. Regular expressions are for matching patterns. Use something
like str_replace().
Hope that helps.
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
Navigation:
[Reply to this message]
|