I am "forking" php code, kicking off scripts to run in the background allowing the browser application to continue without having to wait for a response.
I would like to be able to pass a parameter to such a script.
Say i have an array i would like to be accessible to the script in question, how could i pass it over?
$test = array(1,2,3);
//for windows i do the following which works well enough
pclose(popen("start php /path/to/script.php ","r"));
OR for some linux distro's :
exec('php -f /path/to/script.php >/dev/null 2>&1 &');
so firstly, is it possible to pass my array to that script? if its possible to make it accessible to the script, how could i access the passed variable in that script?
(sitting here confused, thinking about passing variable by value/reference....)
thanks!