> I have a php script that I want to run from a command line:
> 
> % /usr/local/bin/php script.php 47264
> 
> 47264 is the argument, however, I can't figure out how to access it inside
> the script.  I thought it was the $ARG array or $ARGV, but I am mistaken...
> can only refresh me?  searching did no good.

$argv is an array that will give you the values and $argc will give you
the total number (count) of arguments.

Also, make sure that you have your php.ini file set up to populate those
variables.

Check this tutorial out: http://www.phpb.com/columns/ray/cli/

To get you started.

--
Ray

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

Reply via email to