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.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to