Re: command line argument vs. urlencode ?

From: Date: Wed, 28 Aug 2002 21:42:27 +0000
Subject: Re: command line argument vs. urlencode ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114428@lists.php.net to get a copy of this message
php is treating command line arguments as GET argument. So that means a + is a space. Try rawurlencode. ----- Original Message ----- From: "Renato Lins" <rlins@thebest.argo.com.br> To: <php-general@lists.php.net> 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 >

« previous php.general (#114428) next »