Accessing to Java app from PHP [duplicate]
Possible Duplicate:
Php/Java Integration
I have a java app. It has some function. How can I call It's function in PHP? I need step by step tutori开发者_Go百科al about it. I need solution except Java/PHP Bridge and Thrift.
These are your options:
- PHP/Java bridge allows you to pull in java classes into PHP code. Works relatively well, but has a bit of a learning curve.
- Calling the java app through exec or system. Each system remains independent, but you can only transfer the output into PHP.
- Use Quercus to run your PHP code.
You may use sockets to communicate between two different applications (regardless of technologies)
PHP take a look at some examples from the PHP Manual
JAVA Use a ServerSocket
for incoming connections.
精彩评论