R: [PHP-WIN] PHP MSDOS Console

From: Date: Tue, 21 Aug 2001 16:46:27 +0000
Subject: R: [PHP-WIN] PHP MSDOS Console
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-8981@lists.php.net to get a copy of this message
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:sereyvuth@camgsm.com.kh] > Inviato: martedì 21 agosto 2001 17.55 > A: php-windows@lists.php.net > 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: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.windows (#8981) next »