How to execute an Octave file using php
问题 I have an Octave file sr.m sqrt(3^2 + 4^2) I have to execute this file using PHP and display output in browser. The sr.m file is resides in octavepgm folder in Desktop . my php code is $cmd = "octave3.6.4 -qf C:\\Users\\deepu_000\\Desktop\\octavepgm\\sr.m"; $ex = passthru($cmd, $output); var_dump($output); This gives int 1 as output. How can I make this working..please help me.. The expected output is 5. 回答1: There's several issues which I explain further down but here's how you do it: $ php