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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...