Jump to content

Recommended Posts

Posted

I've used Python and PHP before, but I still have no idea how to start a Python program other than from a command line. Any tips on starting a Python script from PHP? Thanks in advance!

Guest Geoff
Posted

You're just outputting to the browser what you normally would to the console.

Posted

I can't get the script to start though.

 

Guess I should have posted more info: I have a Python script in /cgi-bin and I can use it directly from there. But I've been trying to start it from a PHP file outside of /cgi-bin, and a few days ago I started searching online for ways to do that. I tried virtual(); that doesn't seem to be set up. Then I tried include() and require(), but that just outputted the text of the file, instead of running the script. file_get_contents does the same thing.

 

Any ideas?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...