Re: Pass $_GET to php cli.
| From: | Per Jessen | Date: | Mon, 20 Aug 2007 12:41:03 +0000 |
| Subject: | Re: Pass $_GET to php cli. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-261043@lists.php.net to get a copy of this message | ||
N0K wrote:
> So, im trying to the the same in php command line
>
> i have test with many things, but i dont know how to specify this
> variable to the php cli,
> some tested example:
>
> php administration.php --varpass=112233 --checkpass=Submit
> php administration.php --"varpass=112233&checkpass=Submit"
> php administration.php --"varpass=112233" --"checkpass=Submit
>
> And a lot of more combination.
> Can i do this by php command line ?
Yes, but not that way. There is no automagic mapping of argv[]
variables to $_GET. Take a look at the 'getopt' function.
/Per Jessen, Zürich