Re: Php shell scripting
| From: | Evan Nemerson | Date: | Thu, 11 Dec 2003 02:32:09 +0000 |
| Subject: | Re: Php shell scripting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172438@lists.php.net to get a copy of this message | ||
On Thursday 11 December 2003 12:31 am, Jake McHenry wrote:
> Does anyone know how I can pass variables into a script being executed
> from the command line?
>
> I have a script, named testscript. So far, I have been getting all my
> variables from the system env command, not a big deal. But I want to
> input a username into the script, like testscript jmchenry.
>
> In basic shell scripting, the value of any parameters would be $1, $2,
> $3, etc.. within the script, but how can I do this with PHP? Is it
> even possible?
var_dump($argv);
>
> Thanks,
>
> Jake McHenry
> Nittany Travel MIS Coordinator
> http://www.nittanytravel.com
--
Evan Nemerson
evan@coeus-group.com
http://coeusgroup.com/en
--
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
-Benjamin Franklin