PHP CLI: Sending parameters via command line
Hi all,
How do a run a .php file via shell script (CLI ) but providing
parameters?
For example to run foo.php in unix I run the command:
php foo.php
But how do I pass parameters like in web interface: foo.php?
param1=value¶m2=value2 via command Line?
The command:
php foo.php?arg1=value&arg2=value2
Will not work and the just explain how to pass arguments that I
understand that is not parameters like in web - I can not modify
foo.php to make it get arguments, only standard web parameters
(retrieved via $_GET ).
Thanks
Erico
|