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
[EMAIL PROTECTED]
"Bill" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]