Re: How to set GET and POST variables through CLI?

From: Date: Thu, 23 Aug 2007 22:52:46 +0000
Subject: Re: How to set GET and POST variables through CLI?
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-28388@lists.php.net to get a copy of this message
Thanks for your reply John, Having to add something to the top of my php to get the $_GET array isn't a great option for me. I want to be able run my php as it would be run from a web server. Actually I'd also like to integrate it into a homegrown Java based web server I have, and was going to invoke it by calling php.exe directly with parameters taken from the HttpRequest. Is there a better way to integrate php into my mini-server? I don't mind having to do native calls into a DLL if there's a programming interface to let me integrate it. I'd prefer a simple call to the .exe and pass appropriate arguments to set up the $_GET array, but I'll take what I can get. Is there a better forum for asking about server integration? -- Steve John Mertic wrote:
Any parameters passed from the command line go to the $argv array, but you cannot specify the key ( they are put in the order in which they appear ). So calling: php.exe foo.php "foo1" "foo2" would call foo.php and $argv would have: 0 => 'foo.php' 1 => 'foo1' 2 => 'foo2' I suppose you could have something in front of the file that read the arguments and put them into the $_GET array.


« previous php.windows (#28388) next »