Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31901 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23322 invoked by uid 1010); 24 Aug 2007 15:57:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23307 invoked from network); 24 Aug 2007 15:57:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2007 15:57:48 -0000 X-Host-Fingerprint: 69.158.96.142 bas15-toronto12-1168007310.dsl.bell.ca Received: from [69.158.96.142] ([69.158.96.142:17827] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6C/C3-31863-AFFFEC64 for ; Fri, 24 Aug 2007 11:57:48 -0400 Message-ID: <6C.C3.31863.AFFFEC64@pb1.pair.com> To: internals@lists.php.net Date: Fri, 24 Aug 2007 11:57:41 -0400 User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 69.158.96.142 Subject: Re: [PHP-DEV] How to integrate PHP with my homegrown server From: cisco@gremlin.ca (Steve Francisco) Daniel Brown wrote: > On 8/24/07, Steve Francisco wrote: > [snip!] >> If the command line doesn't have a way to cause $_GET to be populated, >> then what other way of invoking PHP could I use? >> -- Steve > > Steve, > > You'd need to transpose the $_GET variables from the request to > $argv variables via the CLI. I don't know exactly how Java would > handle it, but the PHP equivalent (though rather recursive and > unnecessary, it's just here for demonstration purposes) would be: > Thanks Daniel, I can certainly do that in Java without much trouble, however I was hoping to avoid needing to do things in each php file to convert argv into $_GET. I want to be able to serve standard PHP without modifying each one. But you made me realize there is a way. I wrote a small "pre.php" file like this: and in my php.ini, I set this: auto_prepend_file =e:\php523\pre.php Now it works fine without having to modify the php code! All I need to do is have the Java code set up the html parms as argv, and I'm done. -- Steve