Re: Using PHP from the command line

From: Date: Thu, 15 Feb 2001 23:03:22 +0000
Subject: Re: Using PHP from the command line
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-39996@lists.php.net to get a copy of this message
Yeah - like I said .... php foo.php -url http://www.mydomain.com/myfile.php in foo.php echo $argc; // should be 3 echo $argv[0]; // will be the filename echo $argv[1]; // will be -url echo $argv[2]; // will be the url --Joe On Thu, Feb 15, 2001 at 04:47:48PM -0600, Diego Fulgueira wrote: > Yes, but the problem is not to receive the arguments inside PHP.EXE but to > call PHP.EXE passing it those arguments.... > I was thinking of something like: > > c:\>php c:\mysite\myfile.php -url "¢ÛK*É! > ±=ÿ1http://mydomain.com/myfile.php" > > If you have any ideas.... THANKS A LOT. DIEGO. > > > -----Original Message----- > From: Joe Stump [mailto:jstump@zebulon.miester.org] > Sent: Thursday, 15 February, 2001 4:08 PM > To: Diego Fulgueira > Cc: php-general@lists.php.net > Subject: Re: [PHP] Using PHP from the command line > > > use $argv and $argc just like C/C++ :O) > > --Joe > > On Thu, Feb 15, 2001 at 03:50:54PM -0600, Diego Fulgueira wrote: > > Hi!! I was wondering if anyone knows how to pass parameters to PHP.EXE > when > > invoked from the command line (DOS prompt). > > > > I know this shouldn't differ too much from the Linux version, so anyone > who > > has scheduled scripts to run using CRON should have an idea, i guess. > > > > In particular, I don't know how to pass the URL and other parameters > needed. > > > > THANKS A LOT!!! > > Cheers, Diego. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > > ---------------------------------------------------------------------------- > --- > Joe Stump, PHP Hacker, > -o) > http://www.miester.org http://www.care2.com > /\\ > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison > _\_V > ---------------------------------------------------------------------------- > --- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- ------------------------------------------------------------------------------- Joe Stump, PHP Hacker, joestump98@yahoo.com -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V -------------------------------------------------------------------------------

« previous php.general (#39996) next »