Now there is a Java file, for example, it has this function
String Test (string s) {
String S2
Do something deal with data base
return S2;
}
There is also an HTML page, click on a button, want to get a string from the page to the Java function, the Java function returns the result, and then display.
I don't know if this information is useful: Now I'm using Wampsever.
How can I ask the front-desk PHP to call this Java function? Thanks a lot!
------Solution--------------------
Tomacat+apache have to be.
Then, your Java code should be embedded in it!
And then using PHP to call through the socket or curl,
It's supposed to be okay.
------Solution--------------------
1.PHP Curl calls Java Servlet
2.Java Write a webservice,php call
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service