The PHP use the C_style to access to the command line. So $argv[1] is the
first parameter, $argv[2] the second and so on...
$argc is the number of parameters.

Greatings

Darvin



> -----Messaggio originale-----
> Da: SereyVuth Hong [mailto:[EMAIL PROTECTED]]
> Inviato: marted́ 21 agosto 2001 17.55
> A: [EMAIL PROTECTED]
> Oggetto: [PHP-WIN] PHP MSDOS Console
>
>
> Dir All,
>
> I'm a new PHP, and using PWS4.0 + PHP4.0.6-dev.
> It is nice to request (*.php) from browser.
>
> But I want to run *.php thru MSDOS console,
> so I try eg.
> 1/ c:\php>php -q -f hello.php  => Hello
> ---hello.php---
> <?
>     echo "Hello";
> ?>
>
> I need to pass some arguments to hello.php,
> but I do not know how to get the arguments from command line in hello.php.
> eg:
> 2/ c:\php>php -q -f hello.php Mr. Jonh Smith => Hello Mr. Jonh Smith
> ---hello.php---
> <?
>     echo "Hello".??????????????????;
> ?>
>
> Please give me any idea how to do this.
>
> Thanks,
> SereyVuth Hong
> Phnom Penh, Cambodia
>
>
>
>
> --
> PHP Windows 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]
>
>


-- 
PHP Windows 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