Re: Passing Parameters

From: Date: Sun, 28 Nov 2004 08:39:24 +0000
Subject: Re: Passing Parameters
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-202992@lists.php.net to get a copy of this message
David Blackburn wrote:
I used to pass parameters to my scripts like this shell>php myscript.php "dog=max&cat=jess" Since I have upgraded to PHP5 I dont seem to have this functionality any more, has anyone else noticed this ? or know of a way to get this working again ?
You can pass parameters in the "normal" way, ie, php myscript.php -dog=max -cat=jess and read them in with argv, or you can use the pear Console_Getargs and Console_Getopts classes to help you with command line parsing. They way you are doing it now is really not the right way, and I'm suprised it worked, actually.

« previous php.general (#202992) next »