About using json to implement the value transfer mechanism between java and php

Source: Internet
Author: User
About the value transfer mechanism between java and php using json! I have encountered such a problem: first, I can implement this step, that is, the java program sends a request to my php page, I use json_encode to return the data to be fed back to the java program. now I don't know how to implement the following steps. I don't know how to implement the mechanism in the above ?! About the value transfer mechanism between java and php using json!
I have encountered such a problem:

First, I can implement the following steps: The java program sends a request to my php page. I use json_encode to return the data to the java program.

Now, I don't know how to implement the following steps. I don't know how to implement the mechanism in it ?!!!

That is, the java program sends a json data packet to my php page. what function should I use in php or use a custom method to obtain the json data packet sent by the java program? Can I use the request line?

As long as I know how to obtain it, I know how to interpret its json data packets ~~

Master ~~ Thank you ~

I don't have a lot of small scores, so I can try to give it so much ~~ Share:
------ Solution --------------------
In java, you can't directly post and get the past, right? What functions are used?
------ Solution --------------------
Ajax.
------ Solution --------------------
If you use java post, php does not have any data, that is, no POST is successful. check the data to see what went wrong.

Ajax also uses post or get.
------ Solution --------------------
Reference:
I have encountered such a problem:

First, I can implement the following steps: The java program sends a request to my php page. I use json_encode to return the data to the java program.

Now, I don't know how to implement the following steps. I don't know how to implement the mechanism in it ?!!!

That is, the java program sends a json data packet to my php page. what function should I use in php or use a custom method to obtain the json data packet sent by the java program? Use re ......


Json_encode and json_decode of PHP cannot interwork with JAVA. we recommend that you use strings for transmission so that PHP and JAVA can handle them correctly.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.