oquidave

pass to python

May 26th, 2011
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2. /*
  3. * pass arguments to a python script and fire it up from php
  4. */
  5.  
  6. $message = 'fireup up from php';
  7. $cmd = "python travelport_lib/sendmail.py '$to' '$message'";
  8.  
  9. //shell_exec($cmd);
  10. if (shell_exec($cmd)) {
  11. print "successfully fireup the python script";
  12. } else {
  13. print 'failed to fireup the python script';
  14. }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment