How can I remove slashes?
| From: | Matt Rossiter - Verio Southern California | Date: | Tue, 01 Aug 2000 21:52:56 +0000 |
| Subject: | How can I remove slashes? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9571@lists.php.net to get a copy of this message | ||
I'm just a beginner at PHP and I've been designing a simple page which
allows our sales people to do commands like traceroute, ping, whois, etc
from a webpage.
Everything is working perfect right now, but I'm having problems with a
feature I'm trying to add.
If I use the whois command and want to look up a NIC handle, I can do this
command from command line...
>whois -h whois.networksolutions.com "handle MR2801"
However, when using PHP I get the following output...
/usr/bin/whois -h whois.networksolutions.com \'handle MR2801\'
Is there anyway to easily remove the slashes?
Here's the code I use.
<?
if ($whoistarget) {
echo "<pre>\n";
system (EscapeShellCmd("/usr/bin/whois -h $whoistype
" . "'$whoisoption " . "$whoistarget'"));
echo "</pre><br><br>\n";
}
?>
Thanks...
Matt