I would like to use exec to execute another PHP script while passing a parameter and cath it inside the executed script.
Tried passing it as a get variable as follows but it doesn't execute:
$var="test";
$execute="/home/myaccount/special/sda51.cgi?var=$var";
exec("/usr/bin/php $execute");
The following executes but I haven't been able to cath the $var parameter:
$var="test";
$execute="/home/myaccount/special/sda51.cgi";
exec("/usr/bin/php $execute $var");
This didn't produced any results !
$var1=$var['0'];
$var1a=$var['1'];
$var1b=$var['2'];
$var1c=$var['3'];
$var1d=$var['4'];
$var2=$var['var'];
Does anyone have any ideas on how to cath the $var
Thanks,
Peter