RE: [PHP] Parsing command-line arguments

From: Date: Mon, 14 Aug 2000 23:18:56 +0000
Subject: RE: [PHP] Parsing command-line arguments
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11706@lists.php.net to get a copy of this message
On Fri, 11 Aug 2000, Christensen, BruceX R wrote: > Check out $argv (which you may need to access using $HTTP_SERVER_VARS[argv], > depending on your server setup). Thanks. Would this still be true if it was run from the command line on a non-apache version of PHP? (i.e. /usr/bin/php) I mean $argv would be the same, but $HTTP_SERVER_VARS probably wouldn't exist? > -----Original Message----- > From: Deirdre Saoirse [mailto:deirdre@deirdre.net] > Sent: Friday, August 11, 2000 2:11 PM > To: php-general@lists.php.net > Subject: [PHP] Parsing command-line arguments > > > OK, this may be a sick and twisted question, but I'd rather write the code > once. :) > > What facilities are there in PHP for parsing command line arguments? And > does it "know" how it's being invoked? > > I want to share a significant hunk of code between the > compiled-into-apache code and some command line stuff. -- _Deirdre * http://www.sfknit.org * http://www.deirdre.net "We can always count on the British. Except for the Revolutionary War they've been perfect." -- Mel Brooks, on the first Concorde flight since the Paris crash.

« previous php.general (#11706) next »