Re: Passing Parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux