1

I have to execute a matlab file in a php file on localhost, in the php file the code is:

<?php 
    echo exec('matlabFunction');
?>

And in the matlabFunction file we have a testing matlab code containing display('1');. But when i run my php code from localhost in wamp server, i have no results and also no errors, is there a configuration in wamp server that we should change or there is a problem in the code?

fusion3k
  • 11,568
  • 4
  • 25
  • 47
  • 1
    probably this can help you - http://stackoverflow.com/questions/15956000/running-matlab-code-from-php – Armen Mar 29 '16 at 09:58
  • Did you also take a look at the additional optional parameters of `exec`? (`string exec ( string $command [, array &$output [, int &$return_var ]] )`). You're probably doing it wrong and must call Matlab with a filepath/filename option. See also Armen's link. – Matthias W. Apr 03 '16 at 12:48

0 Answers0