Re: command line argument vs. urlencode ?
| From: | Richard Lynch | Date: | Sat, 31 Aug 2002 00:19:35 +0000 |
| Subject: | Re: command line argument vs. urlencode ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-114732@lists.php.net to get a copy of this message | ||
> Any one know why the "+" (plus sign) is not passed as argument to
>$argv when calling a php script from linux shell ?
>
>php test.php 123 xxx+yyyy
Best guess is + is a special character in the shell, so you need:
php test.php 123 "xxx+yyyy"
Or maybe even so far as:
php test.php 123 "xxx\+yyyy"
You'd have to read "man sh" to be 100% sure why + is special.
--
Like Music? http://l-i-e.com/artists.htm