Question

I have a PHP program, and a Python program. You can think that the Python program is like a robot or machine. Typically, it will use a database, do some analysis and return result for you. It is a plain text console application.

I would like to let the user use the program via a web interface. So, I would like to use PHP, accept user input, and the pass it to the Python program, and back to the user.

How can I achieve it? The Python program is always running on the server, which will keep analysis data from the web and the user input, so it can't easily convert to become a script on server side.

Any ideas?

No correct solution

OTHER TIPS

You might want to check exec function. You can pass the input from user as parameters to the python script and get back the output from it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top