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.