command line argument vs. urlencode ?
| From: | Renato Lins | Date: | Wed, 28 Aug 2002 18:37:00 +0000 |
| Subject: | command line argument vs. urlencode ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-114427@lists.php.net to get a copy of this message | ||
Hi,
Any one know why the "+" (plus sign) is not passed as argument to $argv when calling a php script from linux shell ?
if this is not a bug, how do I pass a "+" as argument ?
should I use urlencode/urldecode ?
is that any php.ini variable to turn off this behavior ?
try this and you will see :
---- teste.php----------
<?php
foreach( $argv as $x )
printf("p: %s\n",$x);
?>
---------------
call with :
php test.php 123 xxx+yyyy