PHP to Java communication [closed]

2019-04-08 22:41发布

问题:

I want to use PHP to communicate with a java using shared database to communicate, please help me with sample code or logic.

Thank you.

EDIT:

I appreciate your suggestions, Yes I will be using both php and java to connect to thesame database.

The issue I'm faced with is that I want to know, do I have to create generic command that will be used for the communication? I'm trying to avoid dirty codes and ensure good programming techniques.

回答1:

For sure. Take a look this, will help you:

http://php-java-bridge.sourceforge.net/pjb/



回答2:

Facebook developed Thrift for doing exactly what you are looking for.

Hope this helps Daniel