RE: [PHP] PHP shell scripting..

From: Date: Sun, 22 Jul 2001 18:27:26 +0000
Subject: RE: [PHP] PHP shell scripting..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-59080@lists.php.net to get a copy of this message
Hello Ryan, You can use environment variables for that, like: echo $HOME; /* Shows the HOME environment variable, if set. */ You can also use getenv() en putenv() see also: http://nl.php.net/manual/en/language.variables.external.php hope it works :) - Kees > -----Original Message----- > From: Ryan Christensen [mailto:ryan@devnut.com] > Sent: Sunday, July 22, 2001 8:19 PM > To: php-general@lists.php.net > Subject: [PHP] PHP shell scripting.. > > > I have some questions about using PHP as a shell scripting language... > mainly how you pass arguments to a script on the command line. Say I'm > using: > > -------------------------- > #!/usr/local/bin/php -q > > <? > print "I am: $name\n"; > ?> > -------------------------- > > How do I define test from the command line (as an argument while > executing the script)? > > Thanks in advance for the help! > > --------------------- > Ryan Christensen > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#59080) next »