Re: passing parameters from the command line

From: Date: Mon, 24 Sep 2001 21:05:17 +0000
Subject: Re: passing parameters from the command line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68598@lists.php.net to get a copy of this message
use the C style constant argv[] argc and call your .php like this foo.php 1 5 then, argv[1] = 1 and, argv[2] = 5 -- Marc-Andre Vallee vallee.marc-andre@teccart.qc.ca "Bill" <bill@billtron.com> wrote in message news:3BAF9740.E698C4AC@billtron.com... > When PHP is being run as cgi, I can pass parameters in the url like > this: > > http://mysite.com/phpfile.cgi?var1=5&var2=7 > > Which will get me var1 as 5 and var2 as 7. > > I want to run this cgi PHP script as a cron job. > > So, I'm wondering how to pass it parameters from the command line. > > kind regards, > > bill hollett >

« previous php.general (#68598) next »