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

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

 



If your homegrown server supports calling a CGI program to handle
scripts, then you should be able to integrate PHP into it trivially.
You may want to consult the internals list for more details of how
this all works.

On 8/23/07, Steve Francisco <cisco@xxxxxxxxxx> wrote:
> 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.
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
-- 
John Mertic                                        "Explaining a joke
is like dissecting a frog: you
jmertic@xxxxxxxxx                              understand it better,
but the frog dies in the
                                                          process."

                      -Mark Twain

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux