php is treating command line arguments as GET argument. So that means a + is a space. Try rawurlencode. ----- Original Message ----- From: "Renato Lins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 28, 2002 1:37 PM Subject: [PHP] command line argument vs. urlencode ?
> 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php