I am helpng somebody run a shell script from php and he needs to get the variables created in the script back into the php code when the shell script is finished.
I have suggested he creates the variables in php and send those to the shell script instead; he could do this but would prefer to use the shell script if possible.
This is the code I am using to call the shell script:
$font = "Helvetica-Bold"; $pointsize = "50"; $textcolor = "red"; $undercolor = "blue"; $bordercolor = "yellow"; $angle = "30"; $resize = "100"; // Run the script exec("/home/user/public_html/fred -f $font -p $pointsize -t $textcolor -u $undercolor -b $bordercolor -a $angle -r $resize fred.png 2>&1", $array); //Display any errors echo "<br><pre>".print_r($array)."<br>"; echo "</pre>";