Morning guys,
Am having trouble escaping a string with variables that I want to pass to exec(). Here is the string:
$send_telemetry = exec ( 'echo "Temp 1="'.$temp_1[0].'" Pressure 1="'.$pressure_1[0].'" Flow 1 ="'.$flow_1[0].'" | mutt -s "Telemetry values for AREA 11C" [email protected]' ) ;
echo "$send_telemetry" ;
I had this working before, but some over eager newbie technician thought it a smart idea to change the code and he ended up making a mess out of it. I am aware of shell_exec() but I prefer exec().
Thank you