如何将输入变量从php传递到matlab函数? 这是我的代码 在html部分
<form action="" method="post" style="margin-top:60px">
Enter a Brangay ID <input type="text" name="input1"><br />
Enter a Month Number <input type="text" name="input2"><br />
<input type="submit" name="submit" value="send" /><br />
</form>
在php部分
if(isset($_POST['submit'])) {
// form submitted, now we can look at the data that came through
// the value inside the brackets comes from the name attribute of the input field. (just like submit above)
$in1 = $_POST['input1'];
$in2 = $_POST['input2'];
$inputDir = "C:\Program Files\MATLAB\R2013a\bin";
$command = "matlab -sd ".$inputDir." -r saladsalad('".$in1."','".$in2."')";
exec($command);