I have a PHP script check.php with a function
<?php
function checkValues($arg1, $arg2){
...
}
?>
How can I pass parameter to the function through the Linux command line and run the script?
I have a PHP script check.php with a function
<?php
function checkValues($arg1, $arg2){
...
}
?>
How can I pass parameter to the function through the Linux command line and run the script?
You need to run PHP:
php /my/script.php arg1 arg2
Then in your PHP file:
<?php
// It's 0 based, but arg1 will be at index 1!
var_dump($argv);