0

I need to run a PHP script from a Java class and get the output of the script in order to notify the end user of the results. I will use Runtime.getRuntime.exec("php "); in order to execute the PHP script, but how to capture the console output?

Any suggestions?

2

1 Answer 1

0

The output of the process can be found by using getInputStream on the returned Process from the exec call.

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.