|
Posted by Erwin Moller on 02/01/07 13:43
Shortash wrote:
> Hi Guys,
>
> I need some wisdom from you. Is it possible to have PHP pages posting
> to python scripts on the server side and returning values back to the
> calling PHP files? Like, if my enterval.php form's action=" think.py",
> would the two scripts be able to talk to each other?
>
> Thanks and Best Regards,
>
> "Shortash"
Hi,
I don't know about Phyton (it is on my shortlist of languages I want to
learn), but from PHP you can call Phyton with CURL.
That is: if you mean a real POST (HTTP) to a webserver, that happens to be
running Phyton.
CURL is able to catch the output produced by that script, so you have 2-way
communication.
If you want to call Phyton from commandline, have a look at the exec()
functions and its nephews.
Both can be found at www.php.net.
And more: What I heard of Phyton, it is glued to whatever you can think of,
so maybe another way of PHP <-> Phyton communication exists. But I don't
now anything about that. :-)
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|