RE: [PHP] Command line args HELP!!!
| From: | Don Read | Date: | Wed, 18 Jul 2001 19:35:15 +0000 |
| Subject: | RE: [PHP] Command line args HELP!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-58523@lists.php.net to get a copy of this message | ||
On 18-Jul-2001 Paul A. Procacci wrote:
> Hey all,
> I tried passing an argument to a php script that had a plus sign (+)
> in one of the arguments. Observe the following:
>
> <sciptname>
>
> http://altavista.com/sites/search/web?q=task+management&pg=q&kl=XX
>
> As it turns out the argument gets split into two seperate arguments, but
> I would like to keep it as one argument. Does anyone know how to
> accomplish this.
No, it is one arg q='task management'; the plus is interpreted as a space.
If you want to keep the (+) symbol use web?q=task%2bmanagement& ...
also look at urlencode/decode() functions.
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.