I need to run a php script from the command line and want to be able to pass variables when calling the program... is this possible? Thanks for your time.
I need to run a php script from the command line and want to be able to pass variables when calling the program... is this possible? Thanks for your time.
Install php4-cli/php5-cli (whatever matches the version of PHP you're using. I haven't tried php4 (because php5 is better ) but it should work the same) with synaptic/apt-get/whatever, and read this.
Once phpX-cli is install:
Code:echo "<?php print_r($argv); ?>" > test.phpCode:php -q test.php arg1 arg2 arg3
Thanks for the help guys... everything is working great!
Bookmarks