Re: Running php from shell - passing parameters
| From: | Greg Donald | Date: | Mon, 18 Feb 2002 03:10:39 +0000 |
| Subject: | Re: Running php from shell - passing parameters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85142@lists.php.net to get a copy of this message | ||
> I have to run php script from Linux shell.
>
> I have no trouble except with passing the parameters.
> What is the right sintax to pass them to the script?
>
> I would like to do something like this:
> /usr/local/bin/php ./test.php param=value
What you want is $argc and $argv as described in the predefined variables
documentation:
http://www.php.net/manual/en/language.variables.predefined.php
------------------------------------------------------------------------
Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
------------------------------------------------------------------------