I am not sure the proper name for it, but I am executing PHP code within a Bash script on my Linux server. I have two of these Bash files and want to be able to pass a GET variable from one file to the next.
Here is a simplified version of the 1st file:
#!/usr/bin/php -q
<?php
require("bash2.sh?id=1");
Here is a simplified version of the 2nd file:
#!/usr/bin/php -q
<?php
echo $_GET['id'];
Currently, when I execute the 1st file on a Crontab, I get an error that says :
PHP Warning: require(bash2.sh?id=1): failed to open stream: No such file or directory in /home/bash/bash1.sh on line 2
If I remove the ?id=1 from the require(), it executes without an error.