passing variable to exec function
Posted: Fri Jul 15, 2011 6:35 pm
Ok I am new to php so bear with me
I am trying to pass some variables to an exec function like
And for some reason is not taken the values
the syntax
is exec('ffmpeg -ss 00:00:30.00 -t 25 -i foo.mp3 -acodec copy -y bar-new.mp3 2>&1 &', $out, $rv);
What I am missing here
Best Regards
HP
I am trying to pass some variables to an exec function like
Code: Select all
<?php
$val0 = $_GET['tstart']; /// int value
$val1 = $_GET['tduration']; /// int value
$val2 = $_GET['Rname']; /// string value
//// cropfile.php?tstart=30&tduration=40&Rname=foo.mp3
echo "the word is: $val0 and $val1";
exec('ffmpeg -ss intval($val0) -t intval($val1) -i $val2 -acodec copy newfoo.mp3 2>&1 &', $out, $rv);
echo "output is:<br>\n".implode("<br>\n", $out)."<br>\nexit code:$rv<br>\n";
?>the syntax
is exec('ffmpeg -ss 00:00:30.00 -t 25 -i foo.mp3 -acodec copy -y bar-new.mp3 2>&1 &', $out, $rv);
What I am missing here
Best Regards
HP