argv and plus signs
| From: | Monte Ohrt | Date: | Wed, 04 Jun 2003 20:09:20 +0000 |
| Subject: | argv and plus signs | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-2174@lists.php.net to get a copy of this message | ||
Hi,
I asked Andrei about this and he suggested that I pose this question to
you folks...
I'm trying to use php from the command line and the $argv array seems to
be squashing plus signs (+) in the content.
Example:
$> test.php -R '\w+\.gif' file.txt
A printout of $argv reveals:
Array(
[0] => test.php
[1] => -R
[2] => \w
[3] => \.gif
]4] => file.txt
)
I tried different escapement and quotes thinking that it was the shell
causing the problems, but nothing seems to help. Maybe the args are
expected to be URL encoded? I tried some values like %23, but those went
unchanged, only space is affected.
Is this a bug, or am I missing something? How do I pass a plus sign?
TIA
Monte