Reply to Re: Execute python script from PHP

Your name:

Reply:


Posted by Mike Willbanks on 02/19/06 03:28

Sure,
> I have a python script such as:
> [code]
> #!/usr/bin/python
>
> print "Content-Type: text/plain\n\n"
> f = open("abc.txt", "wb")
> f.write("this is just a test")
> f.close()
> [/code]
>
> It is stored under /public_html/cgi-bin/abc.py
>
> I want to call that from a PHP script which is located under
> /public_html/site/foo.php

exec('/public_html/cgi-bin/abc.py');

--
Mike Willbanks
Zend Certified Engineer
http://blog.digitalstruct.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация