1

I want to make a real time Octave compiler in PHP.enter image description here

The first problem is that I haven't found the solution how to execute in PHP that input would be a command, for example, a=5, but not a file like in the code example below:

<?php 
// example with file input
exec("url_to_compiler url_to_the_file 2>&1", $output);
?>

The second problem is that I've spent much time searching in Google and I haven't found how to load only one time exec() function that could accept many inputs as in the picture above.

Can you give me the solutions how to solve these problems? Maybe should I use other PHP funcion for execution?

1
  • This has nothing to do with PHP - you need to figure out how to pass your inputs to octave directly on the command line or via stdin. Once you've got that figured out, the PHP portion will be trivial. Commented Oct 2, 2014 at 14:30

1 Answer 1

1

If you want to send commands and retrieve answers from the launched command you have to use proc_open and handle the read / write pipes yourself. You also could find several libraries helping you achieve this since it might not be a really straightforward code to properly handle all the situations that might arise if you are not familiar with that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.