How does jsp accept the parameters sent from php? this is $ url & nbsp; localhost: 8089jsp in php. jsp; $ post_data & nbsp; array (username & nbsp; & gt; & nbsp; bob, key & nbsp; & gt; & nbsp; 12345 ); $ ch & nbsp; & nbsp jsp how to accept parameters sent from php
This is in php
$ Url = "http: // localhost: 8089/jsp. jsp ";
$ Post_data = array ("username" => "bob", "key" => "12345 ");
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, $ url );
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
Curl_setopt ($ ch, CURLOPT_POST, 1 );
Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ post_data );
$ Output = curl_exec ($ ch );
Curl_close ($ ch );
Print_r ($ output );
Then how should I accept $ post_data in php in jsp?
Then how can I display it?
Kneel down ......
------ Solution --------------------
Form submission.
------ Solution --------------------
This is irrelevant to php. can you use get http: // xxxx/xx? A = 1 & B = 2 or post (your example ).
------ Solution --------------------
If you do not use php code on the page, simply use $ _ POST or $ _ GET to accept echo. if the code is separated from the page, you must use smarty and the background will be allocated to the page.