faqts : Computers : Programming : Languages : PHP : kms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

15 of 16 people (94%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

Is it possible to pass some variables to a php-script via command-line like this :>PHP test.php -var1 -var2

May 22nd, 2001 14:22
Onno Benschop, Thomas Ruschival, http://www.php.net/manual/en/language.variables.predefined.php


Yes, they are called $argv[0..n]
Another variable called $argc contains the number of variables.