Re: Passing args to a PHP script from the command line

From: Date: Thu, 10 Jun 2004 11:31:51 +0000
Subject: Re: Passing args to a PHP script from the command line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-188025@lists.php.net to get a copy of this message
On Thursday 10 June 2004 18:58, Phil Ewington - 43 Plc wrote: > Can anyone tell me how to pass arguments to a PHP script from the command > line? I know I need to use the -args option but how exactly, I have tried > the following... manual > Using PHP from the command line > /usr/bin/php myscript.php -args key=value > > but this does not work, the script executes but key is not available as > $_GET["key"] in my script. Any pointers will be much appreciated. print_r($argv); -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* An American's a person who isn't afraid to criticize the president but is always polite to traffic cops. */

« previous php.general (#188025) next »