Bruce
Bruce

Reputation: 35285

How to call a PHP class member function from a Java file?

I am using PHP/Java bridge to run PHP scripts on the Tomcat server. Can someone point me to an example as to how to call my PHP scripts from a Java file.

<?php 

class X{

//variables

//functions   

 }

?>

Now I want to call the member functions of class X using its object via a Java file. How do I do this? I want to implement multithreading using the Java file and call multiple PHP functions on separate thread.

Upvotes: 1

Views: 855

Answers (2)

George
George

Reputation: 8378

Maybe JPHP is what you are looking for?

Upvotes: 2

Bruce
Bruce

Reputation: 35285

Found an example here -

http://php-java-bridge.sourceforge.net/pjb/examples/source.php?source=PhpThreads.java

Couldn't make out much though

Upvotes: 1

Related Questions