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 "http://mydomain.com/myfile.php"
> 
> If you have any ideas.... THANKS A LOT.  DIEGO.
> 
> 
> -----Original Message-----
> From: Joe Stump [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 15 February, 2001 4:08 PM
> To: Diego Fulgueira
> Cc: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> --
> 
> ----------------------------------------------------------------------------
> ---
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to