Jump to content

how to execute python files


Darkness Soul

Recommended Posts

Yo,

I need a little help over there.. I wanna to run a python script from a php page.. something like:
[code]/* block code */
switch ( $var )
{
  case 1:
      # run first.py
  case 2:
      # run second.py
}
/* block code */[/code]
This is just an exemple from my idea..

Thanks anyway.

D.Soul
Link to comment
Share on other sites

hm, its don't work.. i've tried it this logic:

print '1'
shell_exec
print '3'

the py file is togheter in the same folder, so i use the $result as you said, but, it print '1', and stop printing.. do nothing..

tonight i will try better, now im little busy, but thanks =)

D.Soul
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.